{
  "openapi": "3.1.0",
  "info": {
    "title": "System1 Models API",
    "version": "0.1.0",
    "x-source": "https://api.system1models.ai/openapi.json",
    "x-snapshot-date": "2026-09-30",
    "description": "Jev-compatible text decision API. Sign in with Google, create an API key and start with 100M input tokens free. Output tokens are free; image input is coming soon. Dashboard operations use session and CSRF authentication."
  },
  "paths": {
    "/v1/models": {
      "get": {
        "summary": "List Models V1",
        "operationId": "list_models_v1",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Models V1"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/models": {
      "get": {
        "summary": "List Models Legacy Compat",
        "operationId": "list_models_legacy_compat",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Models Legacy Compat"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/{provider}": {
      "get": {
        "summary": "Begin Oauth Sign In",
        "operationId": "begin_oauth_sign_in",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Begin Oauth Sign In"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/{provider}/callback": {
      "get": {
        "summary": "Complete Oauth Sign In",
        "operationId": "complete_oauth_sign_in",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Provider"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Complete Oauth Sign In"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/magic-link": {
      "post": {
        "summary": "Request Magic Link",
        "operationId": "request_magic_link",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagicLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Request Magic Link"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/magic-link/consume": {
      "post": {
        "summary": "Consume Magic Link",
        "operationId": "consume_magic_link",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagicLinkConsumeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Consume Magic Link"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/session": {
      "get": {
        "summary": "Get Dashboard Session",
        "operationId": "get_dashboard_session",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Get Dashboard Session"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/session/csrf": {
      "get": {
        "summary": "Get Session Csrf Token",
        "operationId": "get_session_csrf_token",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Get Session Csrf Token"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/session/logout": {
      "post": {
        "summary": "Logout Session",
        "operationId": "logout_session",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/legal/status": {
      "get": {
        "summary": "Legal Status",
        "operationId": "get_legal_acceptance_status",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegalStatusResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/legal/accept": {
      "post": {
        "summary": "Accept Legal",
        "operationId": "accept_terms_and_dpa",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegalAcceptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegalStatusResponse"
                }
              }
            }
          },
          "403": {
            "description": "A valid CSRF token and both explicit acceptances are required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/dpa/status": {
      "get": {
        "summary": "Dpa Status",
        "operationId": "get_dpa_acceptance_status",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DpaStatusResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/dpa/accept": {
      "post": {
        "summary": "Accept Dpa",
        "operationId": "accept_dpa",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DpaStatusResponse"
                }
              }
            }
          },
          "403": {
            "description": "A valid CSRF token is required"
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/api-keys": {
      "get": {
        "summary": "List Api Keys",
        "operationId": "list_api_keys",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeySummary"
                  },
                  "type": "array",
                  "title": "Response List Api Keys"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      },
      "post": {
        "summary": "Create Api Key",
        "operationId": "create_api_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/api-keys/{key_id}": {
      "delete": {
        "summary": "Revoke Api Key",
        "operationId": "revoke_api_key",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/account/retention": {
      "get": {
        "summary": "Get Account Retention",
        "operationId": "get_account_retention",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Sign in is required"
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      },
      "put": {
        "summary": "Update Account Retention",
        "operationId": "update_account_retention",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Sign in is required"
          },
          "403": {
            "description": "A valid CSRF token is required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/balance": {
      "get": {
        "summary": "Get Account Balance",
        "operationId": "get_account_balance",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "Sign in is required"
          },
          "503": {
            "description": "Balance unavailable"
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "summary": "Get Account Usage",
        "operationId": "get_account_usage",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid page cursor or query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Sign in is required"
          },
          "503": {
            "description": "Usage history unavailable"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size from 1 to 100; defaults to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque request ID from the previous page's next_cursor.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/systemone": {
      "post": {
        "summary": "Systemone",
        "description": "Launch bounds: exactly one question; serialized state up to 16 KiB; request body up to 6 MiB; at most one PNG, JPEG, or WebP image up to 4 MiB decoded and 2,000,000 pixels. Actual token and model option limits are enforced after model tokenization.",
        "operationId": "systemone_v1_systemone_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemOneRequest"
              },
              "example": {
                "model": "s1-fast",
                "state": {
                  "ticket": "Printer on floor 2 is offline again."
                },
                "questions": {
                  "urgency": {
                    "type": "score",
                    "instructions": {
                      "task": "Rate how urgent this ticket is."
                    },
                    "criteria": [
                      "Not urgent",
                      "Somewhat urgent",
                      "Urgent"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse"
                },
                "example": {
                  "id": "dec_example",
                  "model": "s1-fast",
                  "answers": {
                    "urgency": {
                      "type": "score",
                      "score": 1.2,
                      "confidence": 0.6,
                      "legend": {
                        "0": "Not urgent",
                        "1": "Somewhat urgent",
                        "2": "Urgent"
                      },
                      "probabilities": {
                        "0": 0.1,
                        "1": 0.6,
                        "2": 0.3
                      }
                    }
                  },
                  "usage": {
                    "input_tokens": 42,
                    "output_tokens": 0,
                    "decisions": 1
                  },
                  "tier": "eu"
                }
              }
            },
            "headers": {
              "S1-Request-Id": {
                "description": "Request identifier.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Region": {
                "description": "Effective tier.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "eu",
                    "global"
                  ]
                }
              },
              "S1-Execution-Region": {
                "description": "Physical execution region code.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Model": {
                "description": "Model that served the request.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Latency-Ms": {
                "description": "Inference latency in milliseconds.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Charge-Nanos": {
                "description": "Exact charge in the account currency, present when a tariff applies.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Currency": {
                "description": "Account currency, present when a tariff applies.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "EUR",
                    "USD"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request. More than one question returns request_limit_exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                },
                "examples": {
                  "request_limit_exceeded": {
                    "summary": "The launch API accepts one question per request.",
                    "value": {
                      "error": {
                        "code": "request_limit_exceeded",
                        "message": "The launch API accepts exactly one question per request.",
                        "request_id": "dec_example",
                        "retryable": false
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (code invalid_api_key).",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "API key is invalid.",
                    "request_id": "dec_example",
                    "retryable": false
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credit.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "insufficient_credit",
                    "message": "The account has insufficient credit.",
                    "request_id": "dec_example",
                    "retryable": false
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Codes: tier_not_allowed (key may not use the requested tier) and dpa_acceptance_required (accept the Data Processing Agreement in your dashboard before inference).",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "dpa_acceptance_required",
                    "message": "Accept the Data Processing Agreement in your System1 Models dashboard before using the inference API.",
                    "request_id": "dec_example",
                    "retryable": false
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown model"
          },
          "413": {
            "description": "The request body, state, or image exceeds a published size limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unsupported modality"
          },
          "429": {
            "description": "Per-key rate limit exceeded (code rate_limit_exceeded). Retry after the Retry-After delay.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Too many requests for this API key. Retry shortly.",
                    "request_id": "dec_example",
                    "retryable": true
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Model unavailable or capacity limit"
          },
          "504": {
            "description": "Inference deadline expired"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "S1-Region",
            "in": "header",
            "required": false,
            "description": "Processing and tariff tier. Defaults to the API key's default region; an explicit value overrides it only if the key allows that tier (403 tier_not_allowed otherwise). Invalid values return 400 invalid_request. The effective tier is echoed in the S1-Region response header.",
            "schema": {
              "type": "string",
              "enum": [
                "eu",
                "global"
              ]
            },
            "example": "eu"
          }
        ]
      }
    },
    "/v1/multimodal": {
      "post": {
        "summary": "Multimodal",
        "description": "Image inference using the same validation, EU routing, metering, and privacy controls as /v1/systemone. Exactly one validated image is required.",
        "operationId": "create_multimodal_decision",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MultimodalRequest"
              },
              "example": {
                "model": "s1-fast",
                "state": {
                  "ticket": "Printer on floor 2 is offline again."
                },
                "questions": {
                  "urgency": {
                    "type": "score",
                    "instructions": {
                      "task": "Rate how urgent this ticket is."
                    },
                    "criteria": [
                      "Not urgent",
                      "Somewhat urgent",
                      "Urgent"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse"
                },
                "example": {
                  "id": "dec_example",
                  "model": "s1-fast",
                  "answers": {
                    "urgency": {
                      "type": "score",
                      "score": 1.2,
                      "confidence": 0.6,
                      "legend": {
                        "0": "Not urgent",
                        "1": "Somewhat urgent",
                        "2": "Urgent"
                      },
                      "probabilities": {
                        "0": 0.1,
                        "1": 0.6,
                        "2": 0.3
                      }
                    }
                  },
                  "usage": {
                    "input_tokens": 42,
                    "output_tokens": 0,
                    "decisions": 1
                  },
                  "tier": "eu"
                }
              }
            },
            "headers": {
              "S1-Request-Id": {
                "description": "Request identifier.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Region": {
                "description": "Effective tier.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "eu",
                    "global"
                  ]
                }
              },
              "S1-Execution-Region": {
                "description": "Physical execution region code.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Model": {
                "description": "Model that served the request.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Latency-Ms": {
                "description": "Inference latency in milliseconds.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Charge-Nanos": {
                "description": "Exact charge in the account currency, present when a tariff applies.",
                "schema": {
                  "type": "string"
                }
              },
              "S1-Currency": {
                "description": "Account currency, present when a tariff applies.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "EUR",
                    "USD"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (code invalid_api_key).",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "API key is invalid.",
                    "request_id": "dec_example",
                    "retryable": false
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credit.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "insufficient_credit",
                    "message": "The account has insufficient credit.",
                    "request_id": "dec_example",
                    "retryable": false
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Codes: tier_not_allowed (key may not use the requested tier) and dpa_acceptance_required (accept the Data Processing Agreement in your dashboard before inference).",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "dpa_acceptance_required",
                    "message": "Accept the Data Processing Agreement in your System1 Models dashboard before using the inference API.",
                    "request_id": "dec_example",
                    "retryable": false
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown model"
          },
          "413": {
            "description": "The request body, state, or image exceeds a published size limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "Unsupported modality"
          },
          "429": {
            "description": "Per-key rate limit exceeded (code rate_limit_exceeded). Retry after the Retry-After delay.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Too many requests for this API key. Retry shortly.",
                    "request_id": "dec_example",
                    "retryable": true
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Model unavailable or capacity limit"
          },
          "504": {
            "description": "Inference deadline expired"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "S1-Region",
            "in": "header",
            "required": false,
            "description": "Processing and tariff tier. Defaults to the API key's default region; an explicit value overrides it only if the key allows that tier (403 tier_not_allowed otherwise). Invalid values return 400 invalid_request. The effective tier is echoed in the S1-Region response header.",
            "schema": {
              "type": "string",
              "enum": [
                "eu",
                "global"
              ]
            },
            "example": "eu"
          }
        ]
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "summary": "Create Billing Checkout",
        "operationId": "create_billing_checkout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Create Billing Checkout"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/billing/invoices": {
      "get": {
        "summary": "List Billing Invoices",
        "operationId": "list_billing_invoices",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Billing Invoices"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/billing/invoices/{checkout_id}": {
      "get": {
        "summary": "Get Billing Invoice",
        "operationId": "get_billing_invoice",
        "parameters": [
          {
            "name": "checkout_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Checkout Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Get Billing Invoice"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/billing/invoices/{checkout_id}/document": {
      "get": {
        "summary": "Get Billing Invoice Document",
        "operationId": "get_billing_invoice_document",
        "parameters": [
          {
            "name": "checkout_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Checkout Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Get Billing Invoice Document"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    },
    "/v1/billing/refunds": {
      "post": {
        "summary": "Create Billing Refund",
        "operationId": "create_billing_refund",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Create Billing Refund"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "DashboardSession": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiErrorDetail": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "retryable": {
            "type": "boolean",
            "title": "Retryable"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message",
          "request_id",
          "retryable"
        ],
        "title": "ApiErrorDetail"
      },
      "ApiErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ApiErrorDetail"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ApiErrorEnvelope"
      },
      "ApiKeyCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1,
            "title": "Name"
          },
          "default_region": {
            "type": "string",
            "enum": [
              "eu",
              "global"
            ],
            "title": "Default Region"
          },
          "allowed_tiers": {
            "items": {
              "type": "string",
              "enum": [
                "eu",
                "global"
              ]
            },
            "type": "array",
            "maxItems": 2,
            "minItems": 1,
            "title": "Allowed Tiers"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "default_region",
          "allowed_tiers"
        ],
        "title": "ApiKeyCreateRequest"
      },
      "ApiKeyCreatedResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "default_region": {
            "type": "string",
            "enum": [
              "eu",
              "global"
            ],
            "title": "Default Region"
          },
          "allowed_tiers": {
            "items": {
              "type": "string",
              "enum": [
                "eu",
                "global"
              ]
            },
            "type": "array",
            "title": "Allowed Tiers"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "secret": {
            "type": "string",
            "title": "Secret"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "default_region",
          "allowed_tiers",
          "created_at",
          "revoked_at",
          "secret"
        ],
        "title": "ApiKeyCreatedResponse"
      },
      "ApiKeySummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "default_region": {
            "type": "string",
            "enum": [
              "eu",
              "global"
            ],
            "title": "Default Region"
          },
          "allowed_tiers": {
            "items": {
              "type": "string",
              "enum": [
                "eu",
                "global"
              ]
            },
            "type": "array",
            "title": "Allowed Tiers"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "default_region",
          "allowed_tiers",
          "created_at",
          "revoked_at"
        ],
        "title": "ApiKeySummary"
      },
      "BalanceResponse": {
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "EUR",
              "USD"
            ],
            "title": "Currency"
          },
          "available_nanos": {
            "type": "integer",
            "minimum": 0,
            "title": "Available Nanos"
          },
          "reserved_nanos": {
            "type": "integer",
            "minimum": 0,
            "title": "Reserved Nanos"
          },
          "credited_total_nanos": {
            "type": "integer",
            "minimum": 0,
            "title": "Credited Total Nanos"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "currency",
          "available_nanos",
          "reserved_nanos",
          "credited_total_nanos"
        ],
        "title": "BalanceResponse"
      },
      "CheckoutCreateRequest": {
        "properties": {
          "amount_nanos": {
            "type": "integer",
            "title": "Amount Nanos"
          },
          "billing_address": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Address"
          },
          "billing_address_confirmed": {
            "type": "boolean",
            "title": "Billing Address Confirmed",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "amount_nanos"
        ],
        "title": "CheckoutCreateRequest"
      },
      "ChoiceAnswer": {
        "properties": {
          "type": {
            "type": "string",
            "const": "choice",
            "title": "Type"
          },
          "choice": {
            "type": "string",
            "title": "Choice"
          },
          "confidence": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Confidence"
          },
          "probabilities": {
            "additionalProperties": {
              "type": "number",
              "maximum": 1,
              "minimum": 0
            },
            "type": "object",
            "minProperties": 2,
            "title": "Probabilities"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "choice",
          "confidence",
          "probabilities"
        ],
        "title": "ChoiceAnswer"
      },
      "ChoiceQuestion": {
        "properties": {
          "type": {
            "type": "string",
            "const": "choice",
            "title": "Type"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "criteria": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "minProperties": 2,
            "title": "Criteria"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "criteria"
        ],
        "title": "ChoiceQuestion"
      },
      "DpaStatusResponse": {
        "properties": {
          "document_version": {
            "type": "string",
            "title": "Document Version"
          },
          "document_url": {
            "type": "string",
            "title": "Document Url"
          },
          "accepted": {
            "type": "boolean",
            "title": "Accepted"
          },
          "accepted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "document_version",
          "document_url",
          "accepted",
          "accepted_at"
        ],
        "title": "DpaStatusResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InferenceResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "answers": {
            "additionalProperties": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/NoulAnswer"
                },
                {
                  "$ref": "#/components/schemas/ChoiceAnswer"
                },
                {
                  "$ref": "#/components/schemas/ScoreAnswer"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "choice": "#/components/schemas/ChoiceAnswer",
                  "noul": "#/components/schemas/NoulAnswer",
                  "score": "#/components/schemas/ScoreAnswer"
                }
              }
            },
            "type": "object",
            "minProperties": 1,
            "title": "Answers"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "tier": {
            "type": "string",
            "enum": [
              "eu",
              "global"
            ],
            "title": "Tier"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "model",
          "answers",
          "usage",
          "tier"
        ],
        "title": "InferenceResponse"
      },
      "LegalAcceptRequest": {
        "properties": {
          "terms_version": {
            "type": "string",
            "title": "Terms Version"
          },
          "dpa_version": {
            "type": "string",
            "title": "Dpa Version"
          },
          "business_customer": {
            "type": "boolean",
            "title": "Business Customer"
          },
          "accepted_terms": {
            "type": "boolean",
            "title": "Accepted Terms"
          },
          "accepted_dpa": {
            "type": "boolean",
            "title": "Accepted Dpa"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "terms_version",
          "dpa_version",
          "business_customer",
          "accepted_terms",
          "accepted_dpa"
        ],
        "title": "LegalAcceptRequest"
      },
      "LegalStatusResponse": {
        "properties": {
          "terms": {
            "$ref": "#/components/schemas/DpaStatusResponse"
          },
          "dpa": {
            "$ref": "#/components/schemas/DpaStatusResponse"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "terms",
          "dpa"
        ],
        "title": "LegalStatusResponse"
      },
      "MagicLinkConsumeRequest": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 256,
            "minLength": 32,
            "title": "Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "token"
        ],
        "title": "MagicLinkConsumeRequest"
      },
      "MagicLinkRequest": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254,
            "minLength": 3,
            "title": "Email"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "MagicLinkRequest"
      },
      "MultimodalRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "State",
            "description": "String, object, or array serialized to at most 16 KiB of JSON."
          },
          "questions": {
            "additionalProperties": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/NoulQuestion"
                },
                {
                  "$ref": "#/components/schemas/ChoiceQuestion"
                },
                {
                  "$ref": "#/components/schemas/ScoreQuestion"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "choice": "#/components/schemas/ChoiceQuestion",
                  "noul": "#/components/schemas/NoulQuestion",
                  "score": "#/components/schemas/ScoreQuestion"
                }
              }
            },
            "type": "object",
            "maxProperties": 1,
            "minProperties": 1,
            "title": "Questions",
            "description": "Exactly one named question is accepted per launch request."
          },
          "images": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 1,
            "minItems": 1,
            "title": "Images",
            "description": "Exactly one PNG, JPEG, or WebP image, as a base64 data URL or a public HTTPS URL. Decoded size is limited to 4 MiB and 2,000,000 pixels."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model",
          "state",
          "questions",
          "images"
        ],
        "title": "MultimodalRequest"
      },
      "NoulAnswer": {
        "properties": {
          "type": {
            "type": "string",
            "const": "noul",
            "title": "Type"
          },
          "noul": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Noul"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "noul"
        ],
        "title": "NoulAnswer"
      },
      "NoulCriteria": {
        "properties": {
          "true": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "True"
          },
          "false": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "False"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "NoulCriteria"
      },
      "NoulQuestion": {
        "properties": {
          "type": {
            "type": "string",
            "const": "noul",
            "title": "Type"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "criteria": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NoulCriteria"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "NoulQuestion"
      },
      "RefundCreateRequest": {
        "properties": {
          "checkout_id": {
            "type": "string",
            "title": "Checkout Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "checkout_id"
        ],
        "title": "RefundCreateRequest"
      },
      "RetentionResponse": {
        "properties": {
          "usage_history_visible": {
            "type": "boolean",
            "title": "Usage History Visible"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "usage_history_visible"
        ],
        "title": "RetentionResponse"
      },
      "RetentionUpdateRequest": {
        "properties": {
          "usage_history_visible": {
            "type": "boolean",
            "title": "Usage History Visible"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "usage_history_visible"
        ],
        "title": "RetentionUpdateRequest"
      },
      "ScoreAnswer": {
        "properties": {
          "type": {
            "type": "string",
            "const": "score",
            "title": "Type"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "confidence": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Confidence"
          },
          "legend": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                }
              ]
            },
            "type": "object",
            "minProperties": 2,
            "title": "Legend"
          },
          "probabilities": {
            "additionalProperties": {
              "type": "number",
              "maximum": 1,
              "minimum": 0
            },
            "type": "object",
            "minProperties": 2,
            "title": "Probabilities"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "score",
          "confidence",
          "legend",
          "probabilities"
        ],
        "title": "ScoreAnswer"
      },
      "ScoreQuestion": {
        "properties": {
          "type": {
            "type": "string",
            "const": "score",
            "title": "Type"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "criteria": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                }
              ]
            },
            "type": "array",
            "minItems": 2,
            "title": "Criteria"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "criteria"
        ],
        "title": "ScoreQuestion"
      },
      "SystemOneRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "State",
            "description": "String, object, or array serialized to at most 16 KiB of JSON."
          },
          "questions": {
            "additionalProperties": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/NoulQuestion"
                },
                {
                  "$ref": "#/components/schemas/ChoiceQuestion"
                },
                {
                  "$ref": "#/components/schemas/ScoreQuestion"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "choice": "#/components/schemas/ChoiceQuestion",
                  "noul": "#/components/schemas/NoulQuestion",
                  "score": "#/components/schemas/ScoreQuestion"
                }
              }
            },
            "type": "object",
            "maxProperties": 1,
            "minProperties": 1,
            "title": "Questions",
            "description": "Exactly one named question is accepted per launch request."
          },
          "images": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Images",
            "description": "At most one PNG, JPEG, or WebP image, as a base64 data URL or a public HTTPS URL. Decoded size is limited to 4 MiB and 2,000,000 pixels."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model",
          "state",
          "questions"
        ],
        "title": "SystemOneRequest"
      },
      "Usage": {
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 1,
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "title": "Output Tokens"
          },
          "decisions": {
            "type": "integer",
            "minimum": 1,
            "title": "Decisions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "input_tokens",
          "output_tokens",
          "decisions"
        ],
        "title": "Usage"
      },
      "UsageAggregate": {
        "properties": {
          "request_count": {
            "type": "integer",
            "minimum": 0,
            "title": "Request Count"
          },
          "settled_count": {
            "type": "integer",
            "minimum": 0,
            "title": "Settled Count"
          },
          "input_tokens": {
            "type": "integer",
            "minimum": 0,
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "title": "Output Tokens"
          },
          "decisions": {
            "type": "integer",
            "minimum": 0,
            "title": "Decisions"
          },
          "charge_nanos": {
            "type": "integer",
            "minimum": 0,
            "title": "Charge Nanos"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_count",
          "settled_count",
          "input_tokens",
          "output_tokens",
          "decisions",
          "charge_nanos"
        ],
        "title": "UsageAggregate"
      },
      "UsageReceipt": {
        "properties": {
          "event_id": {
            "type": "string",
            "title": "Event Id"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "tier": {
            "type": "string",
            "enum": [
              "eu",
              "global"
            ],
            "title": "Tier"
          },
          "execution_region": {
            "type": "string",
            "title": "Execution Region"
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          },
          "decisions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decisions"
          },
          "tokenizer_version": {
            "type": "string",
            "title": "Tokenizer Version"
          },
          "price_version": {
            "type": "string",
            "title": "Price Version"
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR",
              "USD"
            ],
            "title": "Currency"
          },
          "charge_nanos": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Charge Nanos"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "status": {
            "type": "string",
            "enum": [
              "reserved",
              "settled",
              "released"
            ],
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "trial_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trial Input Tokens"
          },
          "billable_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billable Input Tokens"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "event_id",
          "request_id",
          "model",
          "tier",
          "execution_region",
          "input_tokens",
          "output_tokens",
          "decisions",
          "tokenizer_version",
          "price_version",
          "currency",
          "charge_nanos",
          "latency_ms",
          "status",
          "created_at"
        ],
        "title": "UsageReceipt"
      },
      "UsageResponse": {
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "EUR",
              "USD"
            ],
            "title": "Currency"
          },
          "aggregate": {
            "$ref": "#/components/schemas/UsageAggregate"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/UsageReceipt"
            },
            "type": "array",
            "title": "Data"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "currency",
          "aggregate",
          "data",
          "next_cursor"
        ],
        "title": "UsageResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "DashboardSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "s1m_session",
        "description": "Dashboard sign-in session. State-changing calls also need a matching X-CSRF-Token header. Not for API clients."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "System1 Models API key",
        "description": "Sign in at https://system1models.ai/login and create a key in the dashboard. Send Authorization: Bearer <API key>."
      }
    }
  },
  "servers": [
    {
      "url": "https://api.system1models.ai"
    }
  ]
}
