{
  "components": {
    "schemas": {
      "BillingCostItem": {
        "description": "HF spec: ``{\"requestId\": \"...\", \"costNanoUsd\": 100}`` (non-negative int).",
        "properties": {
          "costNanoUsd": {
            "minimum": 0.0,
            "title": "Costnanousd",
            "type": "integer"
          },
          "requestId": {
            "title": "Requestid",
            "type": "string"
          }
        },
        "required": [
          "requestId",
          "costNanoUsd"
        ],
        "title": "BillingCostItem",
        "type": "object"
      },
      "BillingCostsRequest": {
        "description": "HF spec: ``{\"requestIds\": [\"...\"]}``.",
        "properties": {
          "requestIds": {
            "items": {
              "type": "string"
            },
            "maxItems": 10000,
            "title": "Requestids",
            "type": "array"
          }
        },
        "required": [
          "requestIds"
        ],
        "title": "BillingCostsRequest",
        "type": "object"
      },
      "BillingCostsResponse": {
        "description": "HF spec: ``{\"requests\": [BillingCostItem, ...]}``.",
        "properties": {
          "requests": {
            "items": {
              "$ref": "#/components/schemas/BillingCostItem"
            },
            "title": "Requests",
            "type": "array"
          }
        },
        "required": [
          "requests"
        ],
        "title": "BillingCostsResponse",
        "type": "object"
      },
      "Body_createOAuthToken": {
        "properties": {
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "code_verifier": {
            "title": "Code Verifier",
            "type": "string"
          },
          "grant_type": {
            "title": "Grant Type",
            "type": "string"
          },
          "redirect_uri": {
            "title": "Redirect Uri",
            "type": "string"
          }
        },
        "required": [
          "grant_type"
        ],
        "title": "Body_createOAuthToken",
        "type": "object"
      },
      "Body_postOAuthAuthorize": {
        "properties": {
          "action": {
            "default": "",
            "title": "Action",
            "type": "string"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "code_challenge": {
            "title": "Code Challenge",
            "type": "string"
          },
          "code_challenge_method": {
            "default": "S256",
            "title": "Code Challenge Method",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "redirect_uri": {
            "title": "Redirect Uri",
            "type": "string"
          },
          "resource": {
            "default": "",
            "title": "Resource",
            "type": "string"
          },
          "scope": {
            "default": "mcp",
            "title": "Scope",
            "type": "string"
          },
          "state": {
            "default": "",
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "redirect_uri",
          "code_challenge"
        ],
        "title": "Body_postOAuthAuthorize",
        "type": "object"
      },
      "ContactRequest": {
        "properties": {
          "company": {
            "anyOf": [
              {
                "maxLength": 160,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "message": {
            "maxLength": 2500,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "posthog_distinct_id": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posthog Distinct Id"
          },
          "source": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "topic": {
            "anyOf": [
              {
                "maxLength": 160,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          }
        },
        "required": [
          "name",
          "email",
          "message"
        ],
        "title": "ContactRequest",
        "type": "object"
      },
      "ContactResponse": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "created_at"
        ],
        "title": "ContactResponse",
        "type": "object"
      },
      "CreateKeyRequest": {
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "label"
        ],
        "title": "CreateKeyRequest",
        "type": "object"
      },
      "EnsembleCostBreakdownBody": {
        "properties": {
          "credits": {
            "title": "Credits",
            "type": "integer"
          },
          "model": {
            "title": "Model",
            "type": "string"
          }
        },
        "required": [
          "model",
          "credits"
        ],
        "title": "EnsembleCostBreakdownBody",
        "type": "object"
      },
      "EnsembleForecastRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "minimum": 2.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget"
          },
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/ForecastInputBody"
            },
            "title": "Inputs",
            "type": "array"
          },
          "max_models": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Models"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Models"
          },
          "parameters": {
            "$ref": "#/components/schemas/ForecastParametersBody"
          },
          "scoring_metric": {
            "default": "smape",
            "enum": [
              "smape",
              "mase",
              "crps"
            ],
            "title": "Scoring Metric",
            "type": "string"
          },
          "top_n": {
            "default": 3,
            "minimum": 1.0,
            "title": "Top N",
            "type": "integer"
          }
        },
        "required": [
          "inputs"
        ],
        "title": "EnsembleForecastRequest",
        "type": "object"
      },
      "EnsembleForecastResponseBody": {
        "properties": {
          "created": {
            "title": "Created",
            "type": "integer"
          },
          "ensemble_metadata": {
            "$ref": "#/components/schemas/EnsembleMetadataBody"
          },
          "ensemble_result": {
            "$ref": "#/components/schemas/ForecastResponseBody"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "object": {
            "default": "ensemble_forecast",
            "title": "Object",
            "type": "string"
          },
          "ranked_results": {
            "items": {
              "$ref": "#/components/schemas/EnsembleModelResultBody"
            },
            "title": "Ranked Results",
            "type": "array"
          }
        },
        "required": [
          "ranked_results",
          "ensemble_result",
          "ensemble_metadata"
        ],
        "title": "EnsembleForecastResponseBody",
        "type": "object"
      },
      "EnsembleMetadataBody": {
        "properties": {
          "cost_breakdown": {
            "items": {
              "$ref": "#/components/schemas/EnsembleCostBreakdownBody"
            },
            "title": "Cost Breakdown",
            "type": "array"
          },
          "models_evaluated": {
            "items": {
              "type": "string"
            },
            "title": "Models Evaluated",
            "type": "array"
          },
          "models_in_ensemble": {
            "items": {
              "type": "string"
            },
            "title": "Models In Ensemble",
            "type": "array"
          },
          "scoring_metric": {
            "title": "Scoring Metric",
            "type": "string"
          },
          "selection": {
            "$ref": "#/components/schemas/EnsembleSelectionMetadataBody"
          },
          "top_n": {
            "title": "Top N",
            "type": "integer"
          },
          "total_cost_credits": {
            "title": "Total Cost Credits",
            "type": "integer"
          },
          "weights": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Weights",
            "type": "object"
          }
        },
        "required": [
          "models_evaluated",
          "models_in_ensemble",
          "scoring_metric",
          "top_n",
          "weights",
          "cost_breakdown",
          "total_cost_credits",
          "selection"
        ],
        "title": "EnsembleMetadataBody",
        "type": "object"
      },
      "EnsembleModelResultBody": {
        "properties": {
          "model": {
            "title": "Model",
            "type": "string"
          },
          "rank": {
            "title": "Rank",
            "type": "integer"
          },
          "result": {
            "$ref": "#/components/schemas/ForecastResponseBody"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "scoring_metric": {
            "title": "Scoring Metric",
            "type": "string"
          },
          "selection_reason": {
            "title": "Selection Reason",
            "type": "string"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "model",
          "rank",
          "score",
          "scoring_metric",
          "weight",
          "selection_reason",
          "result"
        ],
        "title": "EnsembleModelResultBody",
        "type": "object"
      },
      "EnsembleSelectionMetadataBody": {
        "properties": {
          "candidate_count": {
            "title": "Candidate Count",
            "type": "integer"
          },
          "filters_applied": {
            "items": {
              "type": "string"
            },
            "title": "Filters Applied",
            "type": "array"
          },
          "held_out_length": {
            "title": "Held Out Length",
            "type": "integer"
          },
          "requested_model_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested Model Count"
          },
          "selection_basis": {
            "title": "Selection Basis",
            "type": "string"
          },
          "strategy": {
            "const": "holdout_backtest",
            "default": "holdout_backtest",
            "title": "Strategy",
            "type": "string"
          }
        },
        "required": [
          "selection_basis",
          "held_out_length",
          "candidate_count",
          "filters_applied"
        ],
        "title": "EnsembleSelectionMetadataBody",
        "type": "object"
      },
      "ErrorCode": {
        "description": "Canonical error codes for /v1/forecast and adjacent endpoints.\n\nSnake_case strings; one source of truth so callers can compare against a\nfixed set instead of guessing at the wire shape. Adding a new failure\nmode means adding it here and using it at the construction site.",
        "enum": [
          "invalid_credential",
          "billing_required",
          "model_access_denied",
          "request_rejected",
          "invalid_argument",
          "payload_too_large",
          "request_too_large",
          "rate_limit_exceeded",
          "upstream_timeout",
          "upstream_unavailable",
          "upstream_grpc_error",
          "upstream_empty",
          "request_error"
        ],
        "title": "ErrorCode",
        "type": "string"
      },
      "ErrorResponseBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint"
          },
          "error": {
            "title": "Error",
            "type": "string"
          }
        },
        "required": [
          "error",
          "code"
        ],
        "title": "ErrorResponseBody",
        "type": "object"
      },
      "ForecastBatchItemBody": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorResponseBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForecastResponseBody"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ok"
        ],
        "title": "ForecastBatchItemBody",
        "type": "object"
      },
      "ForecastBatchRequest": {
        "properties": {
          "requests": {
            "items": {
              "$ref": "#/components/schemas/ForecastRequest"
            },
            "title": "Requests",
            "type": "array"
          }
        },
        "required": [
          "requests"
        ],
        "title": "ForecastBatchRequest",
        "type": "object"
      },
      "ForecastBatchResponseBody": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ForecastBatchItemBody"
            },
            "title": "Data",
            "type": "array"
          },
          "object": {
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "title": "ForecastBatchResponseBody",
        "type": "object"
      },
      "ForecastInputBody": {
        "properties": {
          "future_covariates": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "type": "number"
                  },
                  "type": "array"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Future Covariates"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "past_covariates": {
            "anyOf": [
              {
                "additionalProperties": {
                  "items": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": "array"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Past Covariates"
          },
          "start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "static_covariates": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Static Covariates"
          },
          "target": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          }
        },
        "title": "ForecastInputBody",
        "type": "object"
      },
      "ForecastParametersBody": {
        "properties": {
          "context_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Length"
          },
          "frequency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency"
          },
          "num_samples": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Samples"
          },
          "prediction_length": {
            "default": 24,
            "minimum": 1.0,
            "title": "Prediction Length",
            "type": "integer"
          },
          "quantile_levels": {
            "items": {
              "type": "number"
            },
            "title": "Quantile Levels",
            "type": "array"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          }
        },
        "title": "ForecastParametersBody",
        "type": "object"
      },
      "ForecastRequest": {
        "properties": {
          "inputs": {
            "items": {
              "$ref": "#/components/schemas/ForecastInputBody"
            },
            "title": "Inputs",
            "type": "array"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "parameters": {
            "$ref": "#/components/schemas/ForecastParametersBody"
          }
        },
        "required": [
          "model",
          "inputs"
        ],
        "title": "ForecastRequest",
        "type": "object"
      },
      "ForecastResponseBody": {
        "properties": {
          "created": {
            "title": "Created",
            "type": "integer"
          },
          "horizon": {
            "title": "Horizon",
            "type": "integer"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input_points": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Points"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "max_context_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Context Length"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "object": {
            "default": "forecast",
            "title": "Object",
            "type": "string"
          },
          "outputs": {
            "items": {
              "$ref": "#/components/schemas/PredictionBody"
            },
            "title": "Outputs",
            "type": "array"
          },
          "prediction_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prediction Length"
          },
          "provider": {
            "default": "harpoon",
            "title": "Provider",
            "type": "string"
          },
          "quantile_levels": {
            "items": {
              "type": "number"
            },
            "title": "Quantile Levels",
            "type": "array"
          },
          "truncated_from": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Truncated From"
          },
          "usage": {
            "$ref": "#/components/schemas/UsageBody"
          }
        },
        "required": [
          "model",
          "horizon",
          "quantile_levels",
          "outputs",
          "usage"
        ],
        "title": "ForecastResponseBody",
        "type": "object"
      },
      "ForgotPasswordRequest": {
        "properties": {
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "ForgotPasswordRequest",
        "type": "object"
      },
      "GrantCreditsRequest": {
        "properties": {
          "amount": {
            "title": "Amount",
            "type": "integer"
          },
          "idempotency_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idempotency Key"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "target_user_id": {
            "title": "Target User Id",
            "type": "string"
          }
        },
        "required": [
          "target_user_id",
          "amount",
          "reason"
        ],
        "title": "GrantCreditsRequest",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "LoginRequest": {
        "properties": {
          "cf_turnstile_response": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cf Turnstile Response"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "posthog_distinct_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posthog Distinct Id"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "LoginRequest",
        "type": "object"
      },
      "PredictionBody": {
        "properties": {
          "mean": {
            "items": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "title": "Mean",
            "type": "array"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "quantile_predictions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/QuantilePrediction"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantile Predictions"
          },
          "samples": {
            "anyOf": [
              {
                "items": {
                  "items": {
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "type": "array"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Samples"
          },
          "timestamps": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamps"
          }
        },
        "required": [
          "mean"
        ],
        "title": "PredictionBody",
        "type": "object"
      },
      "PrivacySettingsRequest": {
        "properties": {
          "service_improvement_opt_in": {
            "title": "Service Improvement Opt In",
            "type": "boolean"
          }
        },
        "required": [
          "service_improvement_opt_in"
        ],
        "title": "PrivacySettingsRequest",
        "type": "object"
      },
      "QuantilePrediction": {
        "properties": {
          "level": {
            "exclusiveMaximum": 1.0,
            "exclusiveMinimum": 0.0,
            "title": "Level",
            "type": "number"
          },
          "values": {
            "items": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "title": "Values",
            "type": "array"
          }
        },
        "required": [
          "level",
          "values"
        ],
        "title": "QuantilePrediction",
        "type": "object"
      },
      "RegisterClientRequest": {
        "properties": {
          "client_name": {
            "title": "Client Name",
            "type": "string"
          },
          "redirect_uris": {
            "items": {
              "type": "string"
            },
            "title": "Redirect Uris",
            "type": "array"
          }
        },
        "required": [
          "client_name",
          "redirect_uris"
        ],
        "title": "RegisterClientRequest",
        "type": "object"
      },
      "RegisterRequest": {
        "properties": {
          "accepted_data_terms_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted Data Terms Version"
          },
          "accepted_free_tier_data_terms": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted Free Tier Data Terms"
          },
          "cf_turnstile_response": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cf Turnstile Response"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "password": {
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "posthog_distinct_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posthog Distinct Id"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "RegisterRequest",
        "type": "object"
      },
      "ResetPasswordRequest": {
        "properties": {
          "password": {
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "password"
        ],
        "title": "ResetPasswordRequest",
        "type": "object"
      },
      "ResetUsageRequest": {
        "properties": {
          "end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          },
          "idempotency_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Idempotency Key"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "target_user_id": {
            "title": "Target User Id",
            "type": "string"
          }
        },
        "required": [
          "target_user_id",
          "reason"
        ],
        "title": "ResetUsageRequest",
        "type": "object"
      },
      "SendInviteRequest": {
        "properties": {
          "emails": {
            "items": {
              "format": "email",
              "type": "string"
            },
            "title": "Emails",
            "type": "array"
          }
        },
        "required": [
          "emails"
        ],
        "title": "SendInviteRequest",
        "type": "object"
      },
      "StripeBillingSessionRequest": {
        "properties": {
          "action": {
            "title": "Action",
            "type": "string"
          },
          "cancel_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Url"
          },
          "return_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "success_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Success Url"
          }
        },
        "required": [
          "action"
        ],
        "title": "StripeBillingSessionRequest",
        "type": "object"
      },
      "UsageBody": {
        "properties": {
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens"
        ],
        "title": "UsageBody",
        "type": "object"
      },
      "ValidateCredentialRequest": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          }
        },
        "title": "ValidateCredentialRequest",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    }
  },
  "info": {
    "description": "REST API gateway for the inference gRPC service",
    "title": "Harpoon",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/.well-known/oauth-authorization-server": {
      "get": {
        "description": "Return OAuth 2.1 authorization server metadata (RFC 8414).",
        "operationId": "getOAuthAuthorizationServerMetadata",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Oauth Metadata"
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "description": "Return OAuth protected resource metadata for the hosted MCP endpoint.",
        "operationId": "getMcpProtectedResourceMetadata",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Oauth Protected Resource Metadata"
      }
    },
    "/api/account/billing": {
      "get": {
        "operationId": "getBillingSummary",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Billing Summary"
      }
    },
    "/api/account/billing/stripe": {
      "get": {
        "operationId": "getStripeBillingProfile",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Stripe Billing Profile"
      },
      "post": {
        "operationId": "createStripeBillingSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StripeBillingSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stripe Billing Session"
      }
    },
    "/api/account/keys": {
      "get": {
        "operationId": "listAccountKeys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Keys List"
      },
      "post": {
        "operationId": "createAccountKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keys Create"
      }
    },
    "/api/account/keys/{key_id}": {
      "delete": {
        "operationId": "revokeAccountKey",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Keys Revoke"
      }
    },
    "/api/account/me": {
      "delete": {
        "description": "Permanently delete the authenticated user's account and all associated data.",
        "operationId": "deleteAccountMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Delete Account"
      },
      "get": {
        "operationId": "getAccountMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Me"
      }
    },
    "/api/account/oauth/identities": {
      "get": {
        "operationId": "listOAuthIdentities",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Oauth Identities"
      }
    },
    "/api/account/oauth/identities/{provider}": {
      "delete": {
        "operationId": "unlinkOAuthIdentity",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Unlink Identity"
      }
    },
    "/api/account/privacy": {
      "get": {
        "operationId": "getPrivacySettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Privacy Settings"
      },
      "patch": {
        "operationId": "patchPrivacySettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacySettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Privacy Settings"
      },
      "post": {
        "operationId": "postPrivacySettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacySettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Privacy Settings"
      }
    },
    "/api/account/usage": {
      "delete": {
        "operationId": "deleteUsageEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Delete Usage History"
      },
      "get": {
        "operationId": "listUsageEvents",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 1000,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 100000,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Usage History"
      }
    },
    "/api/account/usage/summary": {
      "get": {
        "description": "Return pre-aggregated usage summary (daily, by-model, by-source, totals, recent events).",
        "operationId": "getUsageSummary",
        "parameters": [
          {
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "in": "query",
            "name": "end",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Usage Summary"
      }
    },
    "/api/admin/billing/adjustments": {
      "get": {
        "description": "List billing adjustments, optionally filtered by target user.",
        "operationId": "adminListAdjustments",
        "parameters": [
          {
            "in": "query",
            "name": "target_user_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Target User Id"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin List Adjustments"
      }
    },
    "/api/admin/billing/credits": {
      "post": {
        "description": "Grant credits to a target user.\n\nRequires admin.  Writes an immutable audit record.",
        "operationId": "adminGrantCredits",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantCreditsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Grant Credits"
      }
    },
    "/api/admin/billing/usage/reset": {
      "post": {
        "description": "Delete usage events for a target user (all time or within a window).\n\nRequires admin.  Writes an immutable audit record.",
        "operationId": "adminResetUsage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetUsageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Reset Usage"
      }
    },
    "/api/auth/forgot-password": {
      "post": {
        "operationId": "forgotPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forgot Password"
      }
    },
    "/api/auth/login": {
      "post": {
        "operationId": "loginUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Login"
      }
    },
    "/api/auth/logout": {
      "post": {
        "operationId": "logoutUser",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Logout"
      }
    },
    "/api/auth/oauth/callback/{provider}": {
      "get": {
        "operationId": "completeOAuthCallback",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Callback"
      }
    },
    "/api/auth/oauth/start": {
      "get": {
        "operationId": "startOAuth",
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "required": true,
            "schema": {
              "title": "Provider",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "next",
            "required": false,
            "schema": {
              "default": "/account/keys",
              "title": "Next",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "intent",
            "required": false,
            "schema": {
              "default": "login",
              "title": "Intent",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "posthog_distinct_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Posthog Distinct Id"
            }
          },
          {
            "in": "query",
            "name": "accepted_free_tier_data_terms",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accepted Free Tier Data Terms"
            }
          },
          {
            "in": "query",
            "name": "consent_version",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Consent Version"
            }
          },
          {
            "in": "query",
            "name": "ref",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ref"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Start"
      }
    },
    "/api/auth/register": {
      "post": {
        "operationId": "registerUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Register"
      }
    },
    "/api/auth/reset-password": {
      "post": {
        "operationId": "resetPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reset Password"
      }
    },
    "/api/campaigns/credits": {
      "get": {
        "description": "Return the user's promotional credit ledger.",
        "operationId": "getPromoCreditLedger",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Promo Credits"
      }
    },
    "/api/campaigns/info/{code}": {
      "get": {
        "description": "Return public metadata about a referral code (for the /invite landing page).",
        "operationId": "getCampaignInfo",
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "title": "Code",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Campaign Info"
      }
    },
    "/api/campaigns/referral": {
      "get": {
        "description": "Return the current user's referral code and link for the default campaign.",
        "operationId": "getUserReferral",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get User Referral"
      }
    },
    "/api/campaigns/referral/invite": {
      "post": {
        "description": "Send referral invite emails to the provided addresses.",
        "operationId": "sendReferralInvites",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Send Referral Invites"
      }
    },
    "/api/contact": {
      "post": {
        "description": "Accept a contact form submission and forward it to Slack.",
        "operationId": "submitContactForm",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Submit Contact Form"
      }
    },
    "/api/models": {
      "get": {
        "operationId": "listModels",
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider"
            }
          },
          {
            "in": "query",
            "name": "capability",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Capability"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "family",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Family"
            }
          },
          {
            "description": "Sort order: popular, context, latency",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "popular",
                    "context",
                    "latency"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Sort order: popular, context, latency",
              "title": "Sort"
            }
          },
          {
            "description": "Filter by tier (e.g. free, paid)",
            "in": "query",
            "name": "tier",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by tier (e.g. free, paid)",
              "title": "Tier"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Models"
      }
    },
    "/api/models/{model_id}": {
      "get": {
        "operationId": "getModelById",
        "parameters": [
          {
            "in": "path",
            "name": "model_id",
            "required": true,
            "schema": {
              "title": "Model Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Model"
      }
    },
    "/api/playground/session": {
      "get": {
        "operationId": "createPlaygroundSession",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Create Session"
      }
    },
    "/api/schema": {
      "get": {
        "operationId": "getApiSchema",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Api Schema"
      }
    },
    "/api/stripe/webhook": {
      "post": {
        "operationId": "handleStripeWebhook",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Handlestripewebhook",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Stripe Webhook"
      }
    },
    "/api/system/status": {
      "get": {
        "operationId": "getSystemStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "System Status"
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getHealth",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Gethealth",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Healthz"
      }
    },
    "/oauth/authorize": {
      "get": {
        "description": "Render the consent page or sign-in form for the authorization flow.",
        "operationId": "getOAuthAuthorize",
        "parameters": [
          {
            "in": "query",
            "name": "client_id",
            "required": true,
            "schema": {
              "title": "Client Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "redirect_uri",
            "required": true,
            "schema": {
              "title": "Redirect Uri",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "response_type",
            "required": true,
            "schema": {
              "title": "Response Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code_challenge",
            "required": true,
            "schema": {
              "title": "Code Challenge",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code_challenge_method",
            "required": false,
            "schema": {
              "default": "S256",
              "title": "Code Challenge Method",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "default": "mcp",
              "title": "Scope",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "",
              "title": "State",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "resource",
            "required": false,
            "schema": {
              "default": "",
              "title": "Resource",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "switch_account",
            "required": false,
            "schema": {
              "default": false,
              "title": "Switch Account",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Authorize Get"
      },
      "post": {
        "description": "Process a consent action or sign-in submission.",
        "operationId": "postOAuthAuthorize",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_postOAuthAuthorize"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Authorize Post"
      }
    },
    "/oauth/register": {
      "post": {
        "description": "Register a new OAuth client (RFC 7591).",
        "operationId": "registerOAuthClient",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterClientRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Register"
      }
    },
    "/oauth/token": {
      "post": {
        "description": "Exchange an authorization code for an access token.",
        "operationId": "createOAuthToken",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_createOAuthToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Oauth Token"
      }
    },
    "/v1/billing/costs": {
      "post": {
        "description": "Return ``costNanoUsd`` for each ``requestId`` owned by the caller.\n\nCalled by HuggingFace's reconciliation system every minute in batches of up\nto 10,000 request IDs. Each requested ID is echoed back in the response,\nwith ``costNanoUsd: 0`` if the caller does not own the request or if it\ndoes not exist, to avoid leaking information about other tenants.",
        "operationId": "billingCosts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingCostsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingCostsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Look up per-request costs in nano-USD"
      }
    },
    "/v1/forecast": {
      "post": {
        "description": "Run a forecast against the inference gRPC service.",
        "operationId": "forecast",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForecastRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastResponseBody"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forecast"
      }
    },
    "/v1/forecast/batch": {
      "post": {
        "description": "Run a batch of forecast requests.",
        "operationId": "forecastBatch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForecastBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastBatchResponseBody"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forecast Batch"
      }
    },
    "/v1/forecast/ensemble": {
      "post": {
        "description": "Run multiple TSFMs, rank by fit quality, and return a blended forecast.",
        "operationId": "forecastEnsemble",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnsembleForecastRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnsembleForecastResponseBody"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Forecast Ensemble"
      }
    },
    "/v1/validate": {
      "post": {
        "operationId": "validateCredential",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Validate Credential"
      }
    }
  }
}
