{
  "openapi": "3.1.0",
  "info": {
    "title": "NinjaChat API",
    "version": "1.0.0",
    "description": "Clean-break NinjaChat v1. Chat and Responses bill actual token usage; images and videos use catalog unit pricing."
  },
  "servers": [
    {
      "url": "https://www.ninjachat.ai/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "managementKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "nj_mk_...",
        "description": "Account-scoped management credential created by the account owner after email verification. Inference keys cannot access these endpoints; management keys cannot run inference."
      },
      "anthropicApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "NinjaChat API key accepted by the Anthropic Messages compatibility endpoint."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "NinjaChat API key",
        "description": "Use an API key created in the NinjaChat developer console."
      }
    },
    "schemas": {
      "RerankResponse": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "relevance_score": {
                  "type": "number"
                },
                "document": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text"
                  ]
                }
              },
              "required": [
                "index",
                "relevance_score"
              ]
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "total_tokens": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "total_tokens"
            ]
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "provider",
          "results",
          "usage",
          "cost_usd",
          "request_id"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "message",
              "type",
              "code"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "RerankRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "rerank-2.5",
              "rerank-2.5-lite"
            ]
          },
          "query": {
            "type": "string",
            "minLength": 1
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1,
            "maxItems": 1000
          },
          "top_n": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "return_documents": {
            "type": "boolean",
            "default": false
          },
          "truncation": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "model",
          "query",
          "documents"
        ],
        "additionalProperties": false
      },
      "SpeechRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "tts-1",
              "tts-1-hd"
            ]
          },
          "input": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "voice": {
            "type": "string",
            "enum": [
              "alloy",
              "ash",
              "coral",
              "echo",
              "fable",
              "onyx",
              "nova",
              "sage",
              "shimmer"
            ]
          },
          "response_format": {
            "type": "string",
            "enum": [
              "mp3",
              "opus",
              "aac",
              "flac",
              "wav",
              "pcm"
            ],
            "default": "mp3"
          },
          "speed": {
            "type": "number",
            "minimum": 0.25,
            "maximum": 4,
            "default": 1
          }
        },
        "required": [
          "model",
          "input",
          "voice"
        ],
        "additionalProperties": false
      },
      "EmbeddingsResponse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "model": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "enum": [
                    "embedding"
                  ]
                },
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "embedding": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              "required": [
                "object",
                "index",
                "embedding"
              ]
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "minimum": 0
              },
              "total_tokens": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "prompt_tokens",
              "total_tokens"
            ]
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "model",
          "data",
          "usage",
          "cost_usd",
          "request_id"
        ]
      },
      "EmbeddingsRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "text-embedding-3-small",
              "voyage-4-large"
            ]
          },
          "input": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "minItems": 1
              },
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0
                },
                "minItems": 1
              },
              {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "minItems": 1
                },
                "minItems": 1
              }
            ]
          },
          "dimensions": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "encoding_format": {
            "type": "string",
            "enum": [
              "float",
              "base64"
            ],
            "default": "float"
          },
          "input_type": {
            "type": "string",
            "enum": [
              "query",
              "document"
            ]
          },
          "truncation": {
            "type": "boolean",
            "default": false
          },
          "user": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "input"
        ],
        "additionalProperties": false
      },
      "ProviderAttemptReceipt": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "served",
              "failed_over",
              "failed"
            ]
          },
          "attempt_index": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "provider",
          "outcome",
          "attempt_index"
        ],
        "additionalProperties": false
      },
      "RouterDecisionSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "ninja/auto"
            ]
          },
          "task": {
            "type": "string"
          },
          "classified_by": {
            "type": "string",
            "enum": [
              "regex",
              "llm",
              "llm-cached"
            ]
          },
          "override": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "long_context",
              "multilingual"
            ]
          },
          "reasoning": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "considered": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          }
        },
        "required": [
          "id",
          "task",
          "classified_by",
          "override",
          "reasoning",
          "candidates",
          "considered"
        ],
        "additionalProperties": false
      },
      "RoutingSummary": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "enum": [
              "balanced",
              "cost",
              "latency",
              "quality"
            ]
          },
          "requested_models": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "resolved_model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderAttemptReceipt"
            }
          },
          "fallbacks_allowed": {
            "type": "boolean"
          },
          "data_policy": {
            "type": "string",
            "enum": [
              "default",
              "no_training",
              "zero_retention"
            ]
          },
          "caching": {
            "type": "string",
            "enum": [
              "auto"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "request",
              "project",
              "default"
            ]
          },
          "router": {
            "$ref": "#/components/schemas/RouterDecisionSummary"
          }
        },
        "required": [
          "strategy",
          "requested_models",
          "resolved_model",
          "provider",
          "fallbacks_allowed",
          "data_policy"
        ],
        "additionalProperties": false
      },
      "ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "response"
            ]
          },
          "created_at": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "incomplete"
            ]
          },
          "error": {
            "type": "null"
          },
          "incomplete_details": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "max_output_tokens",
                  "content_filter"
                ]
              }
            },
            "required": [
              "reason"
            ],
            "additionalProperties": false
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ]
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "output": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "reasoning"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "incomplete"
                      ]
                    },
                    "summary": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "summary_text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "status",
                    "summary"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "message"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "incomplete"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "output_text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "annotations": {
                            "type": "array",
                            "items": {}
                          }
                        },
                        "required": [
                          "type",
                          "text",
                          "annotations"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "status",
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "function_call"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "incomplete"
                      ]
                    },
                    "call_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "arguments": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "status",
                    "call_id",
                    "name",
                    "arguments"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "output_text": {
            "type": "string"
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "previous_response_id": {
            "type": "null"
          },
          "store": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "integer",
                "minimum": 0
              },
              "input_tokens_details": {
                "type": "object",
                "properties": {
                  "cached_tokens": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "cache_creation_tokens": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "cached_tokens",
                  "cache_creation_tokens"
                ],
                "additionalProperties": false
              },
              "output_tokens": {
                "type": "integer",
                "minimum": 0
              },
              "output_tokens_details": {
                "type": "object",
                "properties": {
                  "reasoning_tokens": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "reasoning_tokens"
                ],
                "additionalProperties": false
              },
              "total_tokens": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "input_tokens",
              "input_tokens_details",
              "output_tokens",
              "output_tokens_details",
              "total_tokens"
            ],
            "additionalProperties": false
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_id": {
            "type": "string"
          },
          "routing": {
            "$ref": "#/components/schemas/RoutingSummary"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "status",
          "error",
          "incomplete_details",
          "instructions",
          "max_output_tokens",
          "model",
          "output",
          "output_text",
          "parallel_tool_calls",
          "previous_response_id",
          "store",
          "usage",
          "cost_usd",
          "provider",
          "request_id",
          "routing",
          "metadata"
        ],
        "additionalProperties": false
      },
      "ChatReasoning": {
        "type": "object",
        "properties": {
          "effort": {
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RoutingPolicy": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "enum": [
              "balanced",
              "cost",
              "latency",
              "quality"
            ]
          },
          "providers": {
            "type": "object",
            "properties": {
              "only": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "minItems": 1,
                "maxItems": 20
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "minItems": 1,
                "maxItems": 20
              },
              "order": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "minItems": 1,
                "maxItems": 20
              }
            },
            "additionalProperties": false
          },
          "allow_fallbacks": {
            "type": "boolean",
            "default": true
          },
          "require_parameters": {
            "type": "boolean",
            "default": true
          },
          "data_policy": {
            "type": "string",
            "enum": [
              "default",
              "no_training",
              "zero_retention"
            ],
            "default": "default"
          },
          "caching": {
            "type": "string",
            "enum": [
              "auto"
            ]
          },
          "max_cost_usd": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1000
          }
        },
        "additionalProperties": false
      },
      "ResponsesRequest": {
        "type": "object",
        "properties": {
          "content_filter": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Optional explicit acknowledgement of mandatory server-side content filtering. Only true is accepted. Filtering remains enforced when omitted; false is rejected."
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "models": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "minItems": 1,
            "maxItems": 15
          },
          "input": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "message"
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "developer",
                            "system",
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_image"
                                        ]
                                      },
                                      "image_url": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "image_url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_file"
                                        ]
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "file_data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "file_url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf",
                                          "text/plain",
                                          "text/markdown",
                                          "text/csv",
                                          "application/json"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "minItems": 1
                            }
                          ]
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "function_call"
                          ]
                        },
                        "call_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "arguments": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "call_id",
                        "name",
                        "arguments"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "function_call_output"
                          ]
                        },
                        "call_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "output": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_image"
                                        ]
                                      },
                                      "image_url": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "image_url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_file"
                                        ]
                                      },
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "file_data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "file_url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf",
                                          "text/plain",
                                          "text/markdown",
                                          "text/csv",
                                          "application/json"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "minItems": 1
                            }
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "call_id",
                        "output"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "minItems": 1
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Maximum completion tokens, including reasoning where the provider counts it. Must fit the selected provider's output and context limits. Defaults to 2048 when omitted."
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2
          },
          "top_p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "store": {
            "type": "boolean",
            "enum": [
              false
            ],
            "default": false
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "function"
                  ]
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[a-zA-Z0-9_-]+$"
                },
                "description": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object",
                  "additionalProperties": {},
                  "default": {}
                },
                "strict": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "name"
              ],
              "additionalProperties": false
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "type",
                  "name"
                ],
                "additionalProperties": false
              }
            ]
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "text": {
            "type": "object",
            "properties": {
              "format": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "text"
                        ]
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "json_object"
                        ]
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "json_schema"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "description": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "strict": {
                        "type": "boolean",
                        "default": true
                      }
                    },
                    "required": [
                      "type",
                      "name",
                      "schema"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "reasoning": {
            "$ref": "#/components/schemas/ChatReasoning"
          },
          "routing": {
            "$ref": "#/components/schemas/RoutingPolicy"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 512
            }
          },
          "user": {
            "type": "string",
            "maxLength": 256
          }
        },
        "required": [
          "input"
        ],
        "additionalProperties": false
      },
      "AnthropicMessagesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "max_tokens": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ]
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100000
                    },
                    {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100000
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "image"
                                ]
                              },
                              "source": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "image/jpeg",
                                          "image/png",
                                          "image/gif",
                                          "image/webp"
                                        ]
                                      },
                                      "data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "source"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "document"
                                ]
                              },
                              "source": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf"
                                        ]
                                      },
                                      "data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "text/plain"
                                        ]
                                      },
                                      "data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 100000
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "source"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "tool_use"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "input": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "name",
                              "input"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "tool_result"
                                ]
                              },
                              "tool_use_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "text"
                                              ]
                                            },
                                            "text": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 100000
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "text"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "image"
                                              ]
                                            },
                                            "source": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "url"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string",
                                                      "format": "uri"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "base64"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image/jpeg",
                                                        "image/png",
                                                        "image/gif",
                                                        "image/webp"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 7000000
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "source"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "document"
                                              ]
                                            },
                                            "source": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "base64"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "application/pdf"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 7000000
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "url"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string",
                                                      "maxLength": 4096,
                                                      "format": "uri"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text/plain"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 100000
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "source"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  }
                                ]
                              },
                              "is_error": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "type",
                              "tool_use_id"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  ]
                }
              },
              "required": [
                "role",
                "content"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 100
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            ]
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "top_p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 4
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "description": {
                  "type": "string",
                  "maxLength": 1024
                },
                "input_schema": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "strict": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "input_schema"
              ],
              "additionalProperties": false
            },
            "maxItems": 32
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "any",
                      "none"
                    ]
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "name"
                ],
                "additionalProperties": false
              }
            ]
          },
          "metadata": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string",
                "maxLength": 256
              }
            },
            "additionalProperties": false
          },
          "output_config": {
            "type": "object",
            "properties": {
              "format": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_schema"
                    ]
                  },
                  "schema": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "type",
                  "schema"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "format"
            ],
            "additionalProperties": false
          },
          "routing": {
            "$ref": "#/components/schemas/RoutingPolicy"
          }
        },
        "required": [
          "model",
          "max_tokens",
          "messages"
        ],
        "additionalProperties": false
      },
      "ChatUsage": {
        "type": "object",
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "completion_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "total_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "prompt_tokens_details": {
            "type": "object",
            "properties": {
              "cached_tokens": {
                "type": "integer",
                "minimum": 0
              },
              "cache_creation_tokens": {
                "type": "integer",
                "minimum": 0
              }
            },
            "additionalProperties": false
          },
          "completion_tokens_details": {
            "type": "object",
            "properties": {
              "reasoning_tokens": {
                "type": "integer",
                "minimum": 0
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "prompt_tokens",
          "completion_tokens",
          "total_tokens"
        ],
        "additionalProperties": false
      },
      "ChatCompletionResponse": {
        "type": "object",
        "properties": {
          "cost": {
            "type": "object",
            "properties": {
              "this_request": {
                "type": "string"
              },
              "per_image": {
                "type": "string"
              },
              "per_video": {
                "type": "string"
              },
              "images": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "this_request"
            ],
            "additionalProperties": false
          },
          "balance": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "latency_ms": {
                "type": "number",
                "minimum": 0
              },
              "group": {
                "type": "string"
              },
              "search_depth": {
                "type": "string"
              },
              "results_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "latency_ms"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "resolved_model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "reasoning_content": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "extra_content": {
                            "type": "object",
                            "properties": {
                              "google": {
                                "type": "object",
                                "properties": {
                                  "thought_signature": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "thought_signature"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "arguments": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "function"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                "finish_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "index",
                "message",
                "finish_reason"
              ],
              "additionalProperties": false
            }
          },
          "usage": {
            "$ref": "#/components/schemas/ChatUsage"
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "request_id": {
            "type": "string"
          },
          "routing": {
            "$ref": "#/components/schemas/RoutingSummary"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "model",
          "resolved_model",
          "provider",
          "choices",
          "usage",
          "cost_usd",
          "request_id",
          "routing"
        ],
        "additionalProperties": false
      },
      "ChatCompletionsRequest": {
        "type": "object",
        "properties": {
          "content_filter": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Optional explicit acknowledgement of mandatory server-side content filtering. Only true is accepted. Filtering remains enforced when omitted; false is rejected."
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "models": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "minItems": 1,
            "maxItems": 15
          },
          "messages": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "file_data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "file_url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf",
                                          "text/plain",
                                          "text/markdown",
                                          "text/csv",
                                          "application/json"
                                        ]
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "extra_content": {
                            "type": "object",
                            "properties": {
                              "google": {
                                "type": "object",
                                "properties": {
                                  "thought_signature": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "thought_signature"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "arguments": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "function"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "file_data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "file_url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf",
                                          "text/plain",
                                          "text/markdown",
                                          "text/csv",
                                          "application/json"
                                        ]
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "minItems": 1
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1
          },
          "max_completion_tokens": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Maximum completion tokens, including reasoning where the provider counts it. Must fit the selected provider's output and context limits. Defaults to 2048 when omitted."
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2
          },
          "top_p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "maxItems": 4
              }
            ]
          },
          "frequency_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2
          },
          "presence_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2
          },
          "seed": {
            "type": "integer"
          },
          "user": {
            "type": "string",
            "maxLength": 256
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "response_format": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_object"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_schema"
                    ]
                  },
                  "json_schema": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "description": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "strict": {
                        "type": "boolean",
                        "default": true
                      }
                    },
                    "required": [
                      "name",
                      "schema"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "json_schema"
                ],
                "additionalProperties": false
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "function"
                  ]
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "description": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object",
                      "additionalProperties": {},
                      "default": {}
                    },
                    "strict": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "type",
                "function"
              ],
              "additionalProperties": false
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false
              }
            ]
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "reasoning": {
            "$ref": "#/components/schemas/ChatReasoning"
          },
          "routing": {
            "$ref": "#/components/schemas/RoutingPolicy"
          }
        },
        "required": [
          "messages"
        ],
        "additionalProperties": false
      },
      "PresetChatCompletionsRequest": {
        "type": "object",
        "properties": {
          "content_filter": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Optional explicit acknowledgement of mandatory server-side content filtering. Only true is accepted. Filtering remains enforced when omitted; false is rejected."
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "models": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "minItems": 1,
            "maxItems": 15
          },
          "messages": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "file_data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "file_url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf",
                                          "text/plain",
                                          "text/markdown",
                                          "text/csv",
                                          "application/json"
                                        ]
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "extra_content": {
                            "type": "object",
                            "properties": {
                              "google": {
                                "type": "object",
                                "properties": {
                                  "thought_signature": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "thought_signature"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "arguments": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "function"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "filename": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "file_data": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 7000000
                                      },
                                      "file_url": {
                                        "type": "string",
                                        "maxLength": 4096,
                                        "format": "uri"
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf",
                                          "text/plain",
                                          "text/markdown",
                                          "text/csv",
                                          "application/json"
                                        ]
                                      }
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "minItems": 1
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1
          },
          "max_completion_tokens": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Maximum completion tokens, including reasoning where the provider counts it. Must fit the selected provider's output and context limits. Defaults to 2048 when omitted."
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2
          },
          "top_p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "maxItems": 4
              }
            ]
          },
          "frequency_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2
          },
          "presence_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2
          },
          "seed": {
            "type": "integer"
          },
          "user": {
            "type": "string",
            "maxLength": 256
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "response_format": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_object"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_schema"
                    ]
                  },
                  "json_schema": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "description": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "strict": {
                        "type": "boolean",
                        "default": true
                      }
                    },
                    "required": [
                      "name",
                      "schema"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "json_schema"
                ],
                "additionalProperties": false
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "function"
                  ]
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "description": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object",
                      "additionalProperties": {},
                      "default": {}
                    },
                    "strict": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "type",
                "function"
              ],
              "additionalProperties": false
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false
              }
            ]
          },
          "parallel_tool_calls": {
            "type": "boolean"
          },
          "reasoning": {
            "$ref": "#/components/schemas/ChatReasoning"
          },
          "routing": {
            "$ref": "#/components/schemas/RoutingPolicy"
          }
        },
        "required": [
          "messages"
        ],
        "additionalProperties": false
      },
      "PublicModelHistoryRow": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "successRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "p50Ms": {
            "type": [
              "number",
              "null"
            ]
          },
          "p95Ms": {
            "type": [
              "number",
              "null"
            ]
          },
          "p99Ms": {
            "type": [
              "number",
              "null"
            ]
          },
          "medianTtftMs": {
            "type": [
              "number",
              "null"
            ]
          },
          "tokensPerSec": {
            "type": [
              "number",
              "null"
            ]
          },
          "completionRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "medianGenerationMs": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "date",
          "provider",
          "successRate",
          "p50Ms",
          "p95Ms",
          "p99Ms",
          "medianTtftMs",
          "tokensPerSec",
          "completionRate",
          "medianGenerationMs"
        ],
        "additionalProperties": false
      },
      "PublicModel": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "created": {
            "type": "integer"
          },
          "owned_by": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "name": {
            "type": "string"
          },
          "modality": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "image_edit",
              "video",
              "audio",
              "embedding",
              "rerank",
              "search"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "preview",
              "ga",
              "deprecated",
              "retired"
            ]
          },
          "servable": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contextWindow": {
            "type": "number"
          },
          "maxOutputTokens": {
            "type": "number"
          },
          "pricing": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "token",
                  "image",
                  "second",
                  "request",
                  "character"
                ]
              },
              "typicalRequestUsd": {
                "type": "number",
                "minimum": 0
              },
              "meteredPromptPerToken": {
                "type": "number",
                "minimum": 0
              },
              "meteredCachedPromptPerToken": {
                "type": "number",
                "minimum": 0
              },
              "meteredCacheWritePromptPerToken": {
                "type": "number",
                "minimum": 0
              },
              "meteredCompletionPerToken": {
                "type": "number",
                "minimum": 0
              },
              "perRequestUsd": {
                "type": "number",
                "minimum": 0
              },
              "perUnitUsd": {
                "type": "number",
                "minimum": 0
              },
              "listPerUnitUsd": {
                "type": "number",
                "minimum": 0
              },
              "promotion": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "discountPercent": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100
                  },
                  "startsAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "endsAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "label",
                  "discountPercent",
                  "startsAt",
                  "endsAt"
                ],
                "additionalProperties": false
              },
              "priceDrop": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "droppedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "showUntil": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "label",
                  "droppedAt",
                  "showUntil"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "unit"
            ],
            "additionalProperties": false
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string"
                },
                "providerDisplayName": {
                  "type": "string"
                },
                "upstreamModelId": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "fallback",
                    "emergency"
                  ]
                },
                "available": {
                  "type": "boolean"
                },
                "unsupportedCapabilities": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "tools",
                      "vision",
                      "json_mode",
                      "streaming"
                    ]
                  }
                },
                "trainsOnData": {
                  "type": "boolean"
                },
                "zeroRetentionAvailable": {
                  "type": "boolean"
                },
                "contextWindow": {
                  "type": "number"
                },
                "maxOutputTokens": {
                  "type": "number"
                },
                "performance": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "successRate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "p50Ms": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "p95Ms": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "medianTtftMs": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "successRate",
                    "p50Ms",
                    "p95Ms",
                    "medianTtftMs"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "provider",
                "providerDisplayName",
                "upstreamModelId",
                "role",
                "available"
              ],
              "additionalProperties": false
            }
          },
          "supportedParameters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "brand": {
            "type": "string"
          },
          "virtual": {
            "type": "boolean"
          },
          "pricingNote": {
            "type": "string"
          },
          "overlay": {
            "type": "object",
            "properties": {
              "isOverlay": {
                "type": "boolean"
              },
              "dispatch": {
                "type": "string",
                "enum": [
                  "live",
                  "pending"
                ]
              },
              "overrideStatus": {
                "type": "string"
              }
            },
            "required": [
              "isOverlay",
              "dispatch"
            ],
            "additionalProperties": false
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicModelHistoryRow"
            }
          }
        },
        "required": [
          "object",
          "created",
          "owned_by",
          "id",
          "name",
          "modality",
          "status",
          "servable",
          "capabilities",
          "pricing",
          "providers",
          "supportedParameters",
          "brand"
        ],
        "additionalProperties": false
      },
      "ModelListResponse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicModel"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "data",
          "total",
          "generated_at"
        ],
        "additionalProperties": false
      },
      "ImageGenerationResponse": {
        "type": "object",
        "properties": {
          "cost": {
            "type": "object",
            "properties": {
              "this_request": {
                "type": "string"
              },
              "per_image": {
                "type": "string"
              },
              "per_video": {
                "type": "string"
              },
              "images": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "this_request"
            ],
            "additionalProperties": false
          },
          "balance": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "latency_ms": {
                "type": "number",
                "minimum": 0
              },
              "group": {
                "type": "string"
              },
              "search_depth": {
                "type": "string"
              },
              "results_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "latency_ms"
            ],
            "additionalProperties": false
          },
          "created": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "revised_prompt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "b64_json": {
                      "type": "string",
                      "minLength": 1
                    },
                    "mime_type": {
                      "type": "string",
                      "minLength": 1
                    },
                    "revised_prompt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "b64_json",
                    "mime_type"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "images": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "revised_prompt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "b64_json": {
                      "type": "string",
                      "minLength": 1
                    },
                    "mime_type": {
                      "type": "string",
                      "minLength": 1
                    },
                    "revised_prompt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "b64_json",
                    "mime_type"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "provider": {
            "type": "string"
          },
          "storage": {
            "type": "string",
            "enum": [
              "durable",
              "provider"
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "images_generated": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "images_generated"
            ],
            "additionalProperties": false
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "request_id": {
            "type": "string"
          },
          "routing": {
            "type": "object",
            "properties": {
              "provider_attempts": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              },
              "retries": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "provider_attempts",
              "retries"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "created",
          "data",
          "model",
          "provider",
          "storage",
          "usage",
          "cost_usd",
          "request_id",
          "routing"
        ],
        "additionalProperties": false
      },
      "ImageGenerationRequest": {
        "type": "object",
        "properties": {
          "content_filter": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Optional explicit acknowledgement of mandatory server-side content filtering. Only true is accepted. Filtering remains enforced when omitted; false is rejected."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "model": {
            "type": "string",
            "enum": [
              "nova-canvas",
              "runway-gen4-image-turbo",
              "seedream",
              "recraft-v3",
              "google-imagen-4",
              "nano-banana",
              "nano-banana-2",
              "nano-banana-pro",
              "flux-2-klein",
              "flux-2-pro",
              "flux-2-max",
              "flux-2-flex",
              "flux-schnell",
              "flux-kontext-pro",
              "flux-kontext-max",
              "flux-1-pro-ultra",
              "flux-1.1-pro",
              "flux-1-dev",
              "flux-1-fill",
              "qwen-image-3",
              "qwen-image-max",
              "seedream-4.5",
              "seedream-5-lite",
              "seedream-5-pro",
              "flux-2-klein-4b",
              "flux-2-klein-9b",
              "sdxl-turbo",
              "pruna-p-image",
              "wan-2.6-image",
              "nano-banana-2-lite",
              "bria-fibo",
              "bria-3.2",
              "qwen-image-edit-max",
              "wan-2.7-image-edit",
              "z-image-turbo",
              "qwen-image-2512",
              "flux-2-dev",
              "stable-diffusion-3.5-large",
              "qwen-image-edit-plus",
              "hidream-l1-fast",
              "flux-krea-dev",
              "qwen-image-edit-2511",
              "flux-kontext-dev",
              "grok-imagine",
              "grok-imagine-image-2.0",
              "grok-imagine-image-quality",
              "gpt-image-2",
              "ideogram-v3-quality",
              "ideogram-v3-turbo",
              "google-imagen-4-ultra",
              "google-imagen-4-fast",
              "luma-photon",
              "minimax-image-01",
              "ninja-vision-1",
              "flux-pro-ultra",
              "flux-dev"
            ],
            "default": "nano-banana-2",
            "description": "Image model ID. Legacy ninja-vision-1 resolves to seedream (Seedream 4.5); flux-pro-ultra resolves to flux-1-pro-ultra."
          },
          "size": {
            "type": "string",
            "enum": [
              "1920x1920",
              "2560x1440",
              "1440x2560"
            ],
            "default": "1920x1920"
          },
          "n": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "aspect_ratio": {
            "type": "string",
            "maxLength": 20
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "reference_images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "minItems": 1,
            "maxItems": 14,
            "description": "Reference image URLs, in order. Use this or image, not both. The maximum depends on the model."
          },
          "width": {
            "type": "integer",
            "minimum": 256,
            "maximum": 2048
          },
          "height": {
            "type": "integer",
            "minimum": 256,
            "maximum": 2048
          },
          "storage": {
            "type": "string",
            "enum": [
              "durable",
              "provider"
            ],
            "default": "durable",
            "description": "Optional; defaults to durable. durable copies the output to NinjaChat storage and returns a permanent URL. provider skips that copy for lower latency and returns the provider's temporary URL or inline base64 payload."
          }
        },
        "required": [
          "prompt"
        ],
        "additionalProperties": false
      },
      "VideoCreateResponse": {
        "type": "object",
        "properties": {
          "cost": {
            "type": "object",
            "properties": {
              "this_request": {
                "type": "string"
              },
              "per_image": {
                "type": "string"
              },
              "per_video": {
                "type": "string"
              },
              "images": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "this_request"
            ],
            "additionalProperties": false
          },
          "balance": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "latency_ms": {
                "type": "number",
                "minimum": 0
              },
              "group": {
                "type": "string"
              },
              "search_depth": {
                "type": "string"
              },
              "results_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "latency_ms"
            ],
            "additionalProperties": false
          },
          "message": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "video"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued"
            ]
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "request_id": {
            "type": "string"
          },
          "trace_request_id": {
            "type": "string",
            "description": "Original request receipt ID, also returned in X-Request-ID. Use id or request_id to poll the video job."
          }
        },
        "required": [
          "id",
          "object",
          "status",
          "model",
          "cost_usd",
          "request_id"
        ],
        "additionalProperties": false
      },
      "VideoCreateRequest": {
        "type": "object",
        "properties": {
          "content_filter": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Optional explicit acknowledgement of mandatory server-side content filtering. Only true is accepted. Filtering remains enforced when omitted; false is rejected."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "model": {
            "type": "string",
            "enum": [
              "nova-reel",
              "runway-gen4.5",
              "flux-3-video",
              "minimax-h3",
              "hailuo-2.3",
              "hailuo-2.3-fast",
              "happyhorse-1.1",
              "ray-3.2",
              "seedance-2.5",
              "seedance-2",
              "seedance-2.0-fast",
              "seedance-2-mini",
              "seedance-2.0",
              "seedance-1.5-pro",
              "seedance-lite",
              "seedance-pro",
              "grok-imagine-video",
              "grok-imagine-video-1.5",
              "kling-2.5-turbo",
              "kling-3",
              "kling-3-pro",
              "kling-3-turbo",
              "kling-3-omni",
              "wan-2.7",
              "wan-2.7-i2v",
              "wan-2.7-r2v",
              "wan-2.6",
              "wan-2.6-i2v",
              "wan-2.2-t2v-a14b",
              "fast-wan-2.2",
              "fast-wan-qad",
              "pruna-p-video",
              "pixverse-6",
              "pixverse-6-i2v",
              "cosmos-3-nano",
              "cosmos-3-super",
              "vidu-q3",
              "veo-3.1",
              "veo-3.1-fast",
              "gemini-omni-flash",
              "kling-video",
              "google-veo-2",
              "google-veo-3-fast",
              "google-veo-3.1",
              "google-veo-3.1-fast",
              "google-veo",
              "seedance-2-video",
              "seedance-video"
            ],
            "default": "veo-3.1-fast"
          },
          "duration": {
            "type": "integer",
            "minimum": 3,
            "maximum": 15,
            "default": 8
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "16:9",
              "9:16",
              "1:1"
            ],
            "default": "16:9"
          },
          "image_url": {
            "type": "string",
            "format": "uri"
          },
          "end_image_url": {
            "type": "string",
            "format": "uri"
          },
          "reference_images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 4
          },
          "reference_video": {
            "type": "string",
            "format": "uri"
          },
          "reference_audio": {
            "type": "string",
            "format": "uri"
          },
          "generate_audio": {
            "type": "boolean",
            "default": false
          },
          "negative_prompt": {
            "type": "string"
          },
          "watermark": {
            "type": "boolean",
            "default": false
          },
          "video_id": {
            "type": "string",
            "pattern": "^vid_[A-Za-z0-9-]+$",
            "description": "Revise a finished clip in place instead of starting from scratch: the id returned by POST /videos. The prompt then describes the change (task edit, the default) or what happens next (task extend). Only gemini-omni-flash clips can be revised, and model must match the clip; leave model out to inherit it."
          },
          "task": {
            "type": "string",
            "enum": [
              "edit",
              "extend"
            ],
            "description": "With video_id: edit keeps the clip's length and changes its content; extend appends duration seconds (3–10) of new footage, up to 30 seconds total. Defaults to edit."
          }
        },
        "required": [
          "prompt"
        ],
        "additionalProperties": false
      },
      "VideoStatusResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "video"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "completed",
              "failed"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "video_url": {
            "type": "string",
            "format": "uri"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "status"
        ],
        "additionalProperties": false
      },
      "SearchResponse": {
        "type": "object",
        "properties": {
          "cost": {
            "type": "object",
            "properties": {
              "this_request": {
                "type": "string"
              },
              "per_image": {
                "type": "string"
              },
              "per_video": {
                "type": "string"
              },
              "images": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "this_request"
            ],
            "additionalProperties": false
          },
          "balance": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "latency_ms": {
                "type": "number",
                "minimum": 0
              },
              "group": {
                "type": "string"
              },
              "search_depth": {
                "type": "string"
              },
              "results_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "latency_ms"
            ],
            "additionalProperties": false
          },
          "object": {
            "type": "string",
            "enum": [
              "search.results"
            ]
          },
          "query": {
            "type": "string"
          },
          "answer": {
            "type": [
              "string",
              "null"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                },
                "published_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "url",
                "title",
                "content",
                "published_date"
              ],
              "additionalProperties": false
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "url",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "follow_up_questions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "provider": {
            "type": "string"
          },
          "cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "query",
          "answer",
          "sources",
          "follow_up_questions",
          "provider",
          "cost_usd",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "group": {
            "type": "string",
            "enum": [
              "web",
              "news"
            ],
            "default": "web"
          },
          "max_results": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 10
          },
          "search_depth": {
            "type": "string",
            "enum": [
              "basic",
              "advanced"
            ],
            "default": "basic"
          },
          "topic": {
            "type": "string",
            "enum": [
              "general",
              "news",
              "finance"
            ],
            "default": "general"
          },
          "include_answer": {
            "type": "boolean",
            "default": true
          },
          "include_images": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "UsageResponse": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "enum": [
              "1d",
              "7d",
              "30d"
            ]
          },
          "total_requests": {
            "type": "integer",
            "minimum": 0
          },
          "total_cost_cents": {
            "type": "number",
            "minimum": 0
          },
          "total_cost": {
            "type": "string"
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "requests": {
                  "type": "integer",
                  "minimum": 0
                },
                "cost_cents": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "date",
                "requests",
                "cost_cents"
              ],
              "additionalProperties": false
            }
          },
          "by_model": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "model": {
                  "type": "string"
                },
                "requests": {
                  "type": "integer",
                  "minimum": 0
                },
                "cost_cents": {
                  "type": "number",
                  "minimum": 0
                },
                "avg_latency_ms": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "model",
                "requests",
                "cost_cents",
                "avg_latency_ms"
              ],
              "additionalProperties": false
            }
          },
          "by_endpoint": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "endpoint": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "requests": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "endpoint",
                "requests"
              ],
              "additionalProperties": false
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "period",
          "total_requests",
          "total_cost_cents",
          "total_cost",
          "daily",
          "by_model",
          "by_endpoint",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BalanceResponse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "balance"
            ]
          },
          "balance_cents": {
            "type": "number",
            "minimum": 0
          },
          "balance": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "enum": [
              "usd"
            ]
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "balance_cents",
          "balance",
          "currency",
          "request_id"
        ],
        "additionalProperties": false
      },
      "RequestRecordResponse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "request"
            ]
          },
          "request_id": {
            "type": "string"
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ]
          },
          "endpoint": {
            "type": [
              "string",
              "null"
            ]
          },
          "model_requested": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "tokens": {
            "type": "object",
            "properties": {
              "input": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "output": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "reasoning": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cached": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cache_write": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "input",
              "output",
              "reasoning",
              "cached",
              "cache_write"
            ],
            "additionalProperties": false
          },
          "cost_cents": {
            "type": [
              "number",
              "null"
            ]
          },
          "metered_cost_cents": {
            "type": [
              "number",
              "null"
            ]
          },
          "latency_ms": {
            "type": [
              "number",
              "null"
            ]
          },
          "ttfb_ms": {
            "type": [
              "number",
              "null"
            ]
          },
          "status_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "retries": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "routing": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "requested_models": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                }
              },
              "policy": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "balanced",
                      "cost",
                      "latency",
                      "quality"
                    ]
                  },
                  "data_policy": {
                    "type": "string",
                    "enum": [
                      "default",
                      "no_training",
                      "zero_retention"
                    ]
                  },
                  "caching": {
                    "type": "string",
                    "enum": [
                      "auto"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "request",
                      "project",
                      "default"
                    ]
                  },
                  "allow_fallbacks": {
                    "type": "boolean"
                  },
                  "require_parameters": {
                    "type": "boolean"
                  },
                  "providers": {
                    "type": "object",
                    "properties": {
                      "only": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "exclude": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "order": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "max_cost_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "strategy",
                  "data_policy",
                  "source",
                  "allow_fallbacks",
                  "require_parameters",
                  "providers"
                ],
                "additionalProperties": false
              },
              "ordering": {
                "type": "string",
                "enum": [
                  "breaker",
                  "perf",
                  "static"
                ]
              },
              "considered": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                }
              },
              "excluded": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "stage": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "model",
                    "stage",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              },
              "attempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "error",
                        "timeout",
                        "aborted"
                      ]
                    },
                    "error_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "latency_ms": {
                      "type": "number",
                      "minimum": 0
                    },
                    "retry_budget_consumed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "model",
                    "outcome",
                    "error_code",
                    "latency_ms",
                    "retry_budget_consumed"
                  ],
                  "additionalProperties": false
                }
              },
              "served_by": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "provider": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "attempt_index": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "model",
                  "provider",
                  "attempt_index"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "requested_models",
              "policy",
              "ordering",
              "considered",
              "excluded",
              "attempts",
              "served_by"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "object",
          "request_id",
          "timestamp",
          "endpoint",
          "model_requested",
          "model",
          "provider",
          "tokens",
          "cost_cents",
          "metered_cost_cents",
          "latency_ms",
          "ttfb_ms",
          "status_code",
          "retries",
          "error_code",
          "routing"
        ],
        "additionalProperties": false
      },
      "WebhookEvent": {
        "type": "string",
        "enum": [
          "video.completed",
          "video.failed",
          "pipeline.completed",
          "pipeline.failed",
          "request.failed",
          "budget.alert",
          "balance.low",
          "balance.exhausted",
          "credits.added",
          "auto_recharge.failed",
          "key.created",
          "key.revoked",
          "budget.updated"
        ]
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "destination": {
            "type": "string",
            "enum": [
              "webhook",
              "discord",
              "slack"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            }
          },
          "secret_hint": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "secret_hint",
          "created_at"
        ],
        "additionalProperties": false
      },
      "WebhookListResponse": {
        "type": "object",
        "properties": {
          "endpoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          }
        },
        "required": [
          "endpoints"
        ],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "endpoint_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "event": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "delivered",
              "retrying",
              "dead",
              "pending"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "next_attempt_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "request_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event",
          "status",
          "attempts",
          "delivered_at",
          "next_attempt_at",
          "last_error",
          "created_at",
          "request_id"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveriesResponse": {
        "type": "object",
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          }
        },
        "required": [
          "deliveries"
        ],
        "additionalProperties": false
      },
      "WebhookCreateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "destination": {
            "type": "string",
            "enum": [
              "webhook",
              "discord",
              "slack"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            }
          },
          "secret": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "secret",
          "message"
        ],
        "additionalProperties": false
      },
      "WebhookCreateRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "minItems": 1,
            "default": [
              "video.completed",
              "video.failed",
              "pipeline.completed",
              "pipeline.failed",
              "budget.alert",
              "balance.low"
            ]
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "WebhookActionResponse": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "boolean"
          },
          "queued": {
            "type": "boolean"
          },
          "secret": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "WebhookActionRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "update"
                ]
              },
              "endpoint_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              },
              "events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WebhookEvent"
                },
                "minItems": 1,
                "maxItems": 13
              }
            },
            "required": [
              "action",
              "endpoint_id",
              "events"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "rotate_secret"
                ]
              },
              "endpoint_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            },
            "required": [
              "action",
              "endpoint_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "retry"
                ]
              },
              "delivery_id": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
              }
            },
            "required": [
              "action",
              "delivery_id"
            ],
            "additionalProperties": false
          }
        ]
      },
      "WebhookDeleteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "disabled": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "id",
          "disabled"
        ],
        "additionalProperties": false
      },
      "WebhookTestResponse": {
        "type": "object",
        "properties": {
          "delivered": {
            "type": "boolean"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "delivered",
          "detail"
        ],
        "additionalProperties": false
      },
      "WebhookTestRequest": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "endpoint_id"
        ],
        "additionalProperties": false
      },
      "NetworkCatalogResponse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "network.catalog"
            ]
          },
          "models": {
            "type": "integer",
            "minimum": 0
          },
          "modalities": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "models": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "provider",
                "display_name",
                "models"
              ],
              "additionalProperties": false
            }
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "models",
          "modalities",
          "providers",
          "request_id"
        ],
        "additionalProperties": false
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "description": "Safely retry the same logical write without duplicate billing or execution."
      }
    }
  },
  "paths": {
    "/rerank": {
      "post": {
        "summary": "Rerank documents",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerankRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Document relevance and metered usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RerankResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/audio/speech": {
      "post": {
        "summary": "Generate speech",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Binary audio. X-Request-ID and X-NinjaChat-Cost-USD identify the billed request. Buffered until successful generation so retries can safely replay.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/embeddings": {
      "post": {
        "summary": "Create embeddings",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Exact-model text embeddings. OpenAI text-embedding-3-small: $0.02 per million input tokens. Voyage voyage-4-large: $0.12 per million. Charges round up to the wallet's $0.0001 precision. No cross-model fallback or input truncation by default.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ordered embeddings and metered token usage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst result = await client.embeddings.create({\n  model: \"text-embedding-3-small\", input: [\"A document to index\"],\n});\nconsole.log(result.data[0].embedding);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nresult = client.embeddings.create(\n    model=\"text-embedding-3-small\", input=[\"A document to index\"],\n)\nprint(result[\"data\"][0][\"embedding\"])"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/responses": {
      "post": {
        "summary": "Create a stateless response",
        "description": "OpenAI Responses-compatible text, vision, structured-output, and function-calling API. Set stream=true for typed lifecycle events.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Completed response or SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\n\nconst response = await client.responses.create({\n  model: \"ninja/auto\",\n  input: \"Explain the key tradeoffs in one paragraph.\",\n});\n\nconsole.log(response.output_text);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\n\nresponse = client.responses.create(\n    model=\"ninja/auto\",\n    input=\"Explain the key tradeoffs in one paragraph.\",\n)\n\nprint(response[\"output_text\"])"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/messages": {
      "post": {
        "summary": "Create an Anthropic-compatible message",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "anthropicApiKey": []
          }
        ],
        "description": "Messages compatibility for text, image inputs, JSON output schemas, function tools and SSE. Accepts Authorization bearer or x-api-key. Uses the same metered gateway, routing and idempotency as Chat Completions. Native server tools, file IDs and signed thinking history are not supported; unsupported parameters return explicit errors.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnthropicMessagesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Anthropic Message object or Messages SSE lifecycle.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/chat/completions": {
      "post": {
        "summary": "Create a chat completion",
        "description": "OpenAI-compatible chat completions with ordered model fallbacks and provider routing policy. Pass model \"@slug\" to run a saved preset you own — the preset supplies models, prompt, tools, and routing; send only messages.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chat completion or SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\n\nconst completion = await client.chat.completions.create({\n  model: \"ninja/auto\",\n  messages: [{ role: \"user\", content: \"Write a concise launch plan.\" }],\n});\n\nconsole.log(completion.choices[0]?.message.content);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\n\ncompletion = client.chat.completions.create(\n    model=\"ninja/auto\",\n    messages=[{\"role\": \"user\", \"content\": \"Write a concise launch plan.\"}],\n)\n\nprint(completion[\"choices\"][0][\"message\"][\"content\"])"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/presets/{slug}/chat/completions": {
      "post": {
        "summary": "Run a saved preset",
        "description": "Chat completion using a preset's saved model, routing, system prompt, and parameters. Send only your messages; pass model/models to override the preset's chain for this call. Response headers include X-Ninja-Preset and X-Ninja-Preset-Version.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "slug",
            "in": "path"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresetChatCompletionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chat completion or SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No active preset with that slug on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\n\nconst completion = await client.chat.completions.create({\n  model: \"@support\",\n  messages: [{ role: \"user\", content: \"Help me reset my workspace.\" }],\n});"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\n\ncompletion = client.chat.completions.create(\n    model=\"@support\",\n    messages=[{\"role\": \"user\", \"content\": \"Help me reset my workspace.\"}],\n)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/models": {
      "get": {
        "summary": "List live models",
        "security": [],
        "responses": {
          "200": {
            "description": "Runtime catalog data, capabilities, provider rails, availability, and prices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelListResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst models = await client.models.list();\n\nconsole.log(models.data);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nmodels = client.models.list()\n\nprint(models[\"data\"])"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/models/{id}": {
      "get": {
        "summary": "Get a live model",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "history"
              ]
            },
            "required": false,
            "name": "include",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90
            },
            "required": false,
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Runtime model detail with optional daily provider performance history. No platform request, token, user or spend counts are exposed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicModel"
                }
              }
            }
          },
          "404": {
            "description": "Model not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst model = await client.models.retrieve(\"ninja/auto\");\n\nconsole.log(model);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nmodel = client.models.retrieve(\"ninja/auto\")\n\nprint(model)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/images/generations": {
      "post": {
        "summary": "Generate images",
        "description": "storage is optional and defaults to durable, which copies output to NinjaChat storage and returns a permanent URL. Set storage=provider to skip that copy for lower latency; provider mode returns either a temporary provider URL or b64_json plus mime_type.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated images and unit cost.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\n\nconst image = await client.images.generate({\n  model: \"flux-2-pro\",\n  prompt: \"A glass observatory above a cloud sea at sunrise\",\n  storage: \"provider\", // Lowest latency; use \"durable\" for a permanent URL.\n});\n\nconst output = image.data[0];\nconsole.log(output && \"url\" in output ? output.url : output?.b64_json);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\n\nimage = client.images.generate(\n    model=\"flux-2-pro\",\n    prompt=\"A glass observatory above a cloud sea at sunrise\",\n    storage=\"provider\",  # Lowest latency; use \"durable\" for a permanent URL.\n)\n\noutput = image[\"data\"][0]\nprint(output.get(\"url\") or output.get(\"b64_json\"))"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/videos": {
      "post": {
        "summary": "Create a video job",
        "description": "Submit an async video job. Poll GET /videos/{id}, or register a signed webhook (POST /webhooks or https://www.ninjachat.ai/developers/webhooks) for video.completed / video.failed.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Queued video job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\n\nconst job = await client.videos.generate({\n  model: \"veo-3.1-fast\",\n  prompt: \"A slow aerial pass over a neon city in the rain\",\n});\n\nconsole.log(job.id);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\n\njob = client.videos.generate(\n    model=\"veo-3.1-fast\",\n    prompt=\"A slow aerial pass over a neon city in the rain\",\n)\n\nprint(job[\"id\"])"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/videos/{id}": {
      "get": {
        "summary": "Get a video job",
        "description": "Poll job status until completed or failed. Prefer a webhook if you do not want to poll.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Video job status or completed URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Video job not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst video = await client.videos.retrieve(\"video_request_id\");\n\nconsole.log(video.status, video.result?.video_url);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nvideo = client.videos.retrieve(\"video_request_id\")\n\nprint(video[\"status\"], video.get(\"result\", {}).get(\"video_url\"))"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/search": {
      "post": {
        "summary": "Search the web",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search results and optional answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst results = await client.search.query({ query: \"Latest battery storage research\" });\n\nconsole.log(results);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nresults = client.search.query(query=\"Latest battery storage research\")\n\nprint(results)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/usage": {
      "get": {
        "summary": "Get usage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst usage = await client.usage(\"7d\");\n\nconsole.log(usage);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nusage = client.usage(\"7d\")\n\nprint(usage)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/balance": {
      "get": {
        "summary": "Get balance",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst balance = await client.balance();\n\nconsole.log(balance);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nbalance = client.balance()\n\nprint(balance)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/requests/{id}": {
      "get": {
        "summary": "Get a request trace",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestRecordResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst trace = await client.requests.get(\"request_id\");\n\nconsole.log(trace);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\ntrace = client.requests.get(\"request_id\")\n\nprint(trace)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List webhooks",
        "description": "List HTTPS endpoints registered for video completion and spend-alert callbacks. Console: https://www.ninjachat.ai/developers/webhooks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Registered webhook endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst endpoints = await client.webhooks.list();\n\nconsole.log(endpoints);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nendpoints = client.webhooks.list()\n\nprint(endpoints)"
          }
        ],
        "x-ninjachat-status": "current"
      },
      "post": {
        "summary": "Create a webhook",
        "description": "Register an HTTPS URL. Generic receivers get signed JSON; Discord and Slack incoming webhook URLs are detected automatically and receive rich alerts without NinjaChat signing-secret setup. Platform URL credentials are redacted in responses. New events require explicit subscription; omitted events retain the six original defaults. Console: https://www.ninjachat.ai/developers/webhooks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook created. The signing secret is returned once (used only by generic receivers).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst endpoint = await client.webhooks.create({\n  url: \"https://example.com/webhooks/ninjachat\",\n  events: [\"video.completed\", \"video.failed\"],\n});\n\nconsole.log(endpoint.secret); // Store once, then redact it from logs."
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nendpoint = client.webhooks.create(\n    url=\"https://example.com/webhooks/ninjachat\",\n    events=[\"video.completed\", \"video.failed\"],\n)\n\nprint(endpoint[\"secret\"])  # Store once, then redact it from logs."
          }
        ],
        "x-ninjachat-status": "current"
      },
      "patch": {
        "summary": "Manage webhook subscriptions and delivery",
        "description": "Explicit action: update events, rotate_secret (immediate replacement, returned once), or retry a failed delivery. No automatic mutation retries. Existing subscriptions are not expanded automatically.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Action completed. Rotation returns the new secret once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "delete": {
        "summary": "Delete a webhook",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nawait client.webhooks.delete(\"webhook_endpoint_id\");"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nclient.webhooks.delete(\"webhook_endpoint_id\")"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/webhooks/deliveries": {
      "get": {
        "summary": "List webhook deliveries",
        "description": "Recent delivery attempts for one endpoint, newest first.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Recent webhook deliveries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveriesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst deliveries = await client.webhooks.listDeliveries({\n  endpointId: \"webhook_endpoint_id\",\n  limit: 20,\n});\n\nconsole.log(deliveries);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\ndeliveries = client.webhooks.list_deliveries(\n    endpoint_id=\"webhook_endpoint_id\",\n    limit=20,\n)\n\nprint(deliveries)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/webhooks/test": {
      "post": {
        "summary": "Send a test webhook",
        "description": "Send one synthetic event immediately to check your Discord/Slack channel or generic receiver signature handling before relying on live jobs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Immediate test delivery result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst result = await client.webhooks.test(\"webhook_endpoint_id\");\n\nconsole.log(result);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nresult = client.webhooks.test(\"webhook_endpoint_id\")\n\nprint(result)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/health": {
      "get": {
        "summary": "Get gateway health",
        "security": [],
        "responses": {
          "200": {
            "description": "Measured gateway health.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "TypeScript SDK",
            "source": "import { NinjaChat } from \"@ninjachat/sdk\";\n\nconst client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });\nconst health = await client.health();\n\nconsole.log(health);"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\nfrom ninjachat import NinjaChat\n\nclient = NinjaChat(api_key=os.environ[\"NINJACHAT_API_KEY\"])\nhealth = client.health()\n\nprint(health)"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/openapi": {
      "get": {
        "summary": "Get this OpenAPI document",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/chat": {
      "post": {
        "summary": "Create a chat completion (legacy path)",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `POST /responses`.\n\nBackward-compatible path for /chat/completions, including historical field spellings and session memory.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chat completion or SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "POST /responses"
      }
    },
    "/images": {
      "post": {
        "summary": "Generate images (legacy path)",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `POST /images/generations`.\n\nBackward-compatible alias of /images/generations.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated images and unit cost.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "POST /images/generations"
      }
    },
    "/video": {
      "post": {
        "summary": "Create a video job (legacy path)",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `POST /videos`.\n\nBackward-compatible alias of /videos.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Queued video job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "POST /videos"
      }
    },
    "/video/status": {
      "get": {
        "summary": "Get a video job (legacy path)",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `GET /videos/{id}`.\n\nQuery-string compatibility endpoint for /videos/{id}.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "request_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Video job status in the historical response envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Video job not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "GET /videos/{id}"
      }
    },
    "/pricing": {
      "get": {
        "summary": "Get the live price sheet",
        "description": "Public prices generated from the same tables used by billing.",
        "security": [],
        "responses": {
          "200": {
            "description": "Current chat, image, video and search pricing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/network": {
      "get": {
        "summary": "Get public catalog availability",
        "description": "Callable model counts, modality counts and configured provider catalog coverage. Excludes the virtual auto router. No platform usage totals, request or token volumes, activity rankings, market share or provider performance standings are exposed.",
        "security": [],
        "responses": {
          "200": {
            "description": "Catalog availability, not customer activity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkCatalogResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/estimate": {
      "post": {
        "summary": "Estimate request cost",
        "description": "Public pre-flight estimate; does not deduct credits.",
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Estimated typical and maximum cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/batch": {
      "post": {
        "summary": "Run a batch of chat requests",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch results or SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/compare": {
      "post": {
        "summary": "Compare multiple chat models",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked model results or SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/battles": {
      "get": {
        "summary": "Get model battle rankings",
        "description": "Public relative rankings only. No battle counts, customer prompts or recent-activity feed. The retired type=recent query returns 410.",
        "security": [],
        "responses": {
          "200": {
            "description": "Relative model rankings without platform activity counts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "410": {
            "description": "Private activity is not public.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "post": {
        "summary": "Record an authenticated model ranking",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated ELO rankings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/sessions": {
      "post": {
        "summary": "Create a chat session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created or existing session.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "client-side message history on POST /responses",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `client-side message history on POST /responses`."
      }
    },
    "/sessions/{id}": {
      "get": {
        "summary": "Get a chat session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Session messages and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "client-side message history on POST /responses",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `client-side message history on POST /responses`."
      },
      "delete": {
        "summary": "Delete a chat session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Session deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "client-side message history on POST /responses",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `client-side message history on POST /responses`."
      }
    },
    "/sessions/{id}/export": {
      "get": {
        "summary": "Export a chat session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "markdown"
              ]
            },
            "required": false,
            "name": "format",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON or Markdown session export."
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "supported_legacy",
        "x-ninjachat-replacement": "client-side message history on POST /responses",
        "description": "Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: `client-side message history on POST /responses`."
      }
    },
    "/pipelines": {
      "post": {
        "summary": "Create a multimodal pipeline",
        "description": "Run up to five dependent chat, image and video steps as one durable async job.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Pipeline accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-ninjachat-status": "current"
      }
    },
    "/pipelines/{id}": {
      "get": {
        "summary": "Get a multimodal pipeline",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Pipeline status and step outputs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Pipeline not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/webhooks": {
      "patch": {
        "summary": "management.webhooks.update",
        "description": "Requires webhooks:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "get": {
        "summary": "management.webhooks.list",
        "description": "Requires webhooks:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "post": {
        "summary": "management.webhooks.create",
        "description": "Requires webhooks:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/whoami": {
      "get": {
        "summary": "management.whoami",
        "description": "Requires any management key. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/balance": {
      "get": {
        "summary": "management.balance",
        "description": "Requires usage:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/usage": {
      "get": {
        "summary": "management.usage",
        "description": "Requires usage:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/audit": {
      "get": {
        "summary": "management.audit",
        "description": "Requires usage:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": false,
            "name": "before",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/keys": {
      "get": {
        "summary": "management.keys.list",
        "description": "Requires keys:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": false,
            "name": "before",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "post": {
        "summary": "management.keys.create",
        "description": "Requires keys:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-zA-Z0-9\\s_-]+$"
                  },
                  "projectId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "readOnly": {
                    "type": "boolean"
                  },
                  "expiresInDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 365
                  },
                  "monthlyBudgetCents": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/keys/{id}": {
      "get": {
        "summary": "management.keys.retrieve",
        "description": "Requires keys:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "patch": {
        "summary": "management.keys.update",
        "description": "Requires keys:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-zA-Z0-9\\s_-]+$"
                  },
                  "projectId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "readOnly": {
                    "type": "boolean"
                  },
                  "expiresInDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 365
                  },
                  "monthlyBudgetCents": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "delete": {
        "summary": "management.keys.revoke",
        "description": "Requires keys:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/keys/{id}/rotate": {
      "post": {
        "summary": "management.keys.rotate",
        "description": "Requires keys:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/projects": {
      "get": {
        "summary": "management.projects.list",
        "description": "Requires projects:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": false,
            "name": "before",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "post": {
        "summary": "management.projects.create",
        "description": "Requires projects:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-zA-Z0-9\\s_-]+$"
                  },
                  "monthlyBudgetCents": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "environment": {
                    "type": "string",
                    "enum": [
                      "development",
                      "staging",
                      "production"
                    ]
                  },
                  "routingPolicy": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/RoutingPolicy"
                      },
                      {
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/projects/{id}": {
      "get": {
        "summary": "management.projects.retrieve",
        "description": "Requires projects:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "patch": {
        "summary": "management.projects.update",
        "description": "Requires projects:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-zA-Z0-9\\s_-]+$"
                  },
                  "monthlyBudgetCents": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "environment": {
                    "type": "string",
                    "enum": [
                      "development",
                      "staging",
                      "production"
                    ]
                  },
                  "routingPolicy": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/RoutingPolicy"
                      },
                      {
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      },
      "delete": {
        "summary": "management.projects.archive",
        "description": "Requires projects:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/webhooks/{id}": {
      "delete": {
        "summary": "management.webhooks.delete",
        "description": "Requires webhooks:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/webhooks/deliveries": {
      "get": {
        "summary": "management.webhooks.deliveries",
        "description": "Requires webhooks:read. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": false,
            "name": "endpointId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    },
    "/management/webhooks/{id}/test": {
      "post": {
        "summary": "management.webhooks.test",
        "description": "Requires webhooks:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.",
        "security": [
          {
            "managementKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Management operation result. Lists use a data array; key/project/audit lists include next_cursor (null at end). Key create/rotate returns key once plus data metadata. X-Audit-Status: pending means the operation succeeded but its completion audit append needs investigation using X-Request-ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance or project spend limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Management scope is missing, or the account is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist in this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Gateway error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-ninjachat-status": "current"
      }
    }
  },
  "webhooks": {},
  "x-ninjachat-contract-sha256": "df530775ec7be5779917a6c4c5b6015b760809e62fd002827541bf6cac66310e"
}
