{
  "openapi": "3.1.0",
  "info": {
    "title": "eu-router",
    "description": "",
    "license": {
      "name": ""
    },
    "version": "0.1.0"
  },
  "paths": {
    "/api/account/deletion": {
      "post": {
        "tags": [
          "crate::account_deletion"
        ],
        "operationId": "request_deletion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionAccepted"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/deletion-readiness": {
      "get": {
        "tags": [
          "crate::account_deletion"
        ],
        "operationId": "readiness",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionReadiness"
                }
              }
            }
          }
        }
      }
    },
    "/api/catalogue/models": {
      "get": {
        "tags": [
          "crate::catalogue"
        ],
        "operationId": "console_models",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsoleModel"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/catalogue/providers": {
      "get": {
        "tags": [
          "crate::catalogue"
        ],
        "operationId": "console_providers",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsoleProvider"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/catalogue/routes": {
      "get": {
        "tags": [
          "crate::catalogue"
        ],
        "operationId": "public_routes",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicRoute"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/chat": {
      "post": {
        "tags": [
          "crate::inference"
        ],
        "operationId": "playground",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "JSON completion or text/event-stream when stream=true",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/credits": {
      "get": {
        "tags": [
          "crate::billing"
        ],
        "operationId": "credits",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credits"
                }
              }
            }
          }
        }
      }
    },
    "/api/exports": {
      "get": {
        "tags": [
          "crate::exports"
        ],
        "operationId": "list",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Destination"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "crate::exports"
        ],
        "operationId": "create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDestination"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            }
          }
        }
      }
    },
    "/api/exports/config": {
      "get": {
        "tags": [
          "crate::exports"
        ],
        "operationId": "config",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportReadiness"
                }
              }
            }
          }
        }
      }
    },
    "/api/exports/failures": {
      "get": {
        "tags": [
          "crate::exports"
        ],
        "operationId": "failures",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FailedExport"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/exports/{id}": {
      "delete": {
        "tags": [
          "crate::exports"
        ],
        "operationId": "remove",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "patch": {
        "tags": [
          "crate::exports"
        ],
        "operationId": "set_state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DestinationState"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            }
          }
        }
      }
    },
    "/api/generations": {
      "get": {
        "tags": [
          "crate::inference::reads"
        ],
        "operationId": "generations",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "models",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "providers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationPage"
                }
              }
            }
          }
        }
      }
    },
    "/api/generations/{id}": {
      "get": {
        "tags": [
          "crate::inference::reads"
        ],
        "operationId": "generation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Request ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Generation"
                }
              }
            }
          }
        }
      }
    },
    "/api/guardrails": {
      "get": {
        "tags": [
          "crate::guardrails"
        ],
        "operationId": "get_policy",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailPolicy"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "crate::guardrails"
        ],
        "operationId": "put_policy",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailPolicy"
                }
              }
            }
          }
        }
      }
    },
    "/api/keys": {
      "get": {
        "tags": [
          "crate::keys"
        ],
        "operationId": "list_keys",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "crate::keys"
        ],
        "operationId": "create_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedKey"
                }
              }
            }
          }
        }
      }
    },
    "/api/keys/{id}": {
      "delete": {
        "tags": [
          "crate::keys"
        ],
        "operationId": "delete_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Key ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "patch": {
        "tags": [
          "crate::keys"
        ],
        "operationId": "update_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Key ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/log-sessions": {
      "get": {
        "tags": [
          "crate::inference::reads"
        ],
        "operationId": "sessions",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "models",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "providers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptySessions"
                }
              }
            }
          }
        }
      }
    },
    "/api/organization": {
      "get": {
        "tags": [
          "crate::console"
        ],
        "operationId": "get_organization",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "crate::console"
        ],
        "operationId": "update_organization",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          }
        }
      }
    },
    "/api/organizations": {
      "get": {
        "tags": [
          "crate::team"
        ],
        "operationId": "organizations",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamOrganization"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/payments": {
      "get": {
        "tags": [
          "crate::payments"
        ],
        "operationId": "list_orders",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/auto-top-up": {
      "get": {
        "tags": [
          "crate::payments::auto_top_up"
        ],
        "operationId": "get_setting",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoTopUpView"
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/auto-top-up/consent": {
      "post": {
        "tags": [
          "crate::payments::auto_top_up"
        ],
        "operationId": "consent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoTopUpView"
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/auto-top-up/disable": {
      "post": {
        "tags": [
          "crate::payments::auto_top_up"
        ],
        "operationId": "disable",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoTopUpView"
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/checkout": {
      "post": {
        "tags": [
          "crate::payments"
        ],
        "operationId": "checkout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderView"
                }
              }
            }
          },
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderView"
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/documents": {
      "get": {
        "tags": [
          "crate::payments::documents"
        ],
        "operationId": "list_payment_documents",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Document"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/quote": {
      "get": {
        "tags": [
          "crate::payments"
        ],
        "operationId": "quote",
        "parameters": [
          {
            "name": "creditCents",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteView"
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/{id}": {
      "get": {
        "tags": [
          "crate::payments"
        ],
        "operationId": "get_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Order ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderView"
                }
              }
            }
          }
        }
      }
    },
    "/api/presets": {
      "get": {
        "tags": [
          "crate::presets"
        ],
        "operationId": "list_presets",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Preset"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "crate::presets"
        ],
        "operationId": "create_preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresetInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preset"
                }
              }
            }
          }
        }
      }
    },
    "/api/presets/{id}": {
      "put": {
        "tags": [
          "crate::presets"
        ],
        "operationId": "update_preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresetInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preset"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "crate::presets"
        ],
        "operationId": "delete_preset",
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/provider-credentials": {
      "get": {
        "tags": [
          "crate::byok"
        ],
        "operationId": "list_provider_credentials",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CredentialView"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "crate::byok"
        ],
        "operationId": "upsert_provider_credential",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialView"
                }
              }
            }
          }
        }
      }
    },
    "/api/provider-credentials/{id}": {
      "delete": {
        "tags": [
          "crate::byok"
        ],
        "operationId": "revoke_provider_credential",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credential ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/settings/account": {
      "get": {
        "tags": [
          "crate::console"
        ],
        "operationId": "get_account",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "crate::console"
        ],
        "operationId": "update_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/notifications": {
      "get": {
        "tags": [
          "crate::notifications"
        ],
        "operationId": "notification_settings",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettings"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "crate::notifications"
        ],
        "operationId": "update_notification_settings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationSettingsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettings"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/privacy": {
      "get": {
        "tags": [
          "crate::console"
        ],
        "operationId": "get_privacy",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivacySettings"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "crate::console"
        ],
        "operationId": "update_privacy",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacyPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivacySettings"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/routing": {
      "get": {
        "tags": [
          "crate::console"
        ],
        "operationId": "get_routing",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingSettings"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "crate::console"
        ],
        "operationId": "update_routing",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoutingPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingSettings"
                }
              }
            }
          }
        }
      }
    },
    "/api/team": {
      "get": {
        "tags": [
          "crate::team"
        ],
        "operationId": "members",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamMember"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/team/accept": {
      "post": {
        "tags": [
          "crate::team"
        ],
        "operationId": "accept",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Accept"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamOrganization"
                }
              }
            }
          }
        }
      }
    },
    "/api/team/invitations": {
      "get": {
        "tags": [
          "crate::team"
        ],
        "operationId": "invitations",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invitation"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "crate::team"
        ],
        "operationId": "invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedInvitation"
                }
              }
            }
          }
        }
      }
    },
    "/api/team/invitations/{id}": {
      "delete": {
        "tags": [
          "crate::team"
        ],
        "operationId": "revoke_invitation",
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/team/{id}": {
      "delete": {
        "tags": [
          "crate::team"
        ],
        "operationId": "remove_member",
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "patch": {
        "tags": [
          "crate::team"
        ],
        "operationId": "change_role",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/transactions": {
      "get": {
        "tags": [
          "crate::billing"
        ],
        "operationId": "transactions",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TransactionView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/usage": {
      "get": {
        "tags": [
          "crate::inference::reads"
        ],
        "operationId": "usage",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "models",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "providers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageSeries"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "crate::inference"
        ],
        "operationId": "chat",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "JSON completion or text/event-stream when stream=true",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "crate::inference"
        ],
        "operationId": "models",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/requests/{id}": {
      "get": {
        "tags": [
          "crate::inference"
        ],
        "operationId": "status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Request ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Generation"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Accept": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Account": {
        "type": "object",
        "required": [
          "name",
          "email",
          "timezone",
          "dateFormat",
          "defaultPresetId"
        ],
        "properties": {
          "dateFormat": {
            "type": "string"
          },
          "defaultPresetId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "AccountPatch": {
        "type": "object",
        "required": [
          "name",
          "email",
          "timezone",
          "dateFormat"
        ],
        "properties": {
          "dateFormat": {
            "type": "string"
          },
          "defaultPresetId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Attempt": {
        "type": "object",
        "required": [
          "provider",
          "region",
          "httpStatus",
          "outcome",
          "latencyMs",
          "byok"
        ],
        "properties": {
          "byok": {
            "type": "boolean"
          },
          "httpStatus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "latencyMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "outcome": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "region": {
            "type": "string"
          }
        }
      },
      "AutoTopUpView": {
        "type": "object",
        "required": [
          "state",
          "thresholdCents",
          "topUpCents",
          "monthlyGrossCapCents",
          "monthCommittedCents"
        ],
        "properties": {
          "disabledReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "firstOrder": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderView"
              }
            ]
          },
          "monthCommittedCents": {
            "type": "integer",
            "format": "int64"
          },
          "monthlyGrossCapCents": {
            "type": "integer",
            "format": "int64"
          },
          "state": {
            "type": "string"
          },
          "thresholdCents": {
            "type": "integer",
            "format": "int64"
          },
          "topUpCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "BillingMode": {
        "type": "string",
        "enum": [
          "platform",
          "byok"
        ]
      },
      "ChatRequest": {
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "properties": {
          "allow_paid_fallback": {
            "type": "boolean"
          },
          "billing_mode": {
            "$ref": "#/components/schemas/BillingMode"
          },
          "frequency_penalty": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "model": {
            "type": "string"
          },
          "presence_penalty": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "top_p": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "CheckoutInput": {
        "type": "object",
        "required": [
          "creditCents"
        ],
        "properties": {
          "creditCents": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ConsentInput": {
        "type": "object",
        "required": [
          "thresholdCents",
          "topUpCents",
          "monthlyGrossCapCents",
          "authorizeRecurring"
        ],
        "properties": {
          "authorizeRecurring": {
            "type": "boolean"
          },
          "monthlyGrossCapCents": {
            "type": "integer",
            "format": "int64"
          },
          "thresholdCents": {
            "type": "integer",
            "format": "int64"
          },
          "topUpCents": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ConsoleModel": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "author",
          "authorSlug",
          "contextWindow",
          "inputPrice",
          "outputPrice",
          "hosting",
          "reasoning",
          "chat",
          "inputNanoeurPerToken",
          "outputNanoeurPerToken"
        ],
        "properties": {
          "author": {
            "type": "string"
          },
          "authorSlug": {
            "type": "string"
          },
          "chat": {
            "type": "boolean"
          },
          "contextWindow": {
            "type": "integer",
            "format": "int32"
          },
          "hosting": {
            "type": "string"
          },
          "inputNanoeurPerToken": {
            "type": "string"
          },
          "inputPrice": {
            "type": "number",
            "format": "double"
          },
          "name": {
            "type": "string"
          },
          "outputNanoeurPerToken": {
            "type": "string"
          },
          "outputPrice": {
            "type": "number",
            "format": "double"
          },
          "reasoning": {
            "type": "boolean"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "ConsoleProvider": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "location",
          "region",
          "firstParty",
          "euOperated",
          "country",
          "dataPolicy"
        ],
        "properties": {
          "country": {
            "type": "string"
          },
          "dataPolicy": {
            "$ref": "#/components/schemas/DataPolicy"
          },
          "euOperated": {
            "type": "boolean"
          },
          "firstParty": {
            "type": "boolean"
          },
          "location": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "CreateDestination": {
        "type": "object",
        "required": [
          "name",
          "endpoint",
          "euRegionEvidence",
          "consentToMetadataExport"
        ],
        "properties": {
          "bearerSecret": {
            "type": [
              "string",
              "null"
            ]
          },
          "consentToMetadataExport": {
            "type": "boolean"
          },
          "endpoint": {
            "type": "string"
          },
          "euRegionEvidence": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateKey": {
        "type": "object",
        "required": [
          "name",
          "limitReset"
        ],
        "properties": {
          "creditLimitNanoeur": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "limitReset": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreatedInvitation": {
        "type": "object",
        "required": [
          "id",
          "token"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "CreatedKey": {
        "type": "object",
        "required": [
          "key",
          "secret"
        ],
        "properties": {
          "key": {
            "$ref": "#/components/schemas/KeyDto"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "CredentialInput": {
        "type": "object",
        "required": [
          "providerSlug",
          "projectId",
          "secretKey"
        ],
        "properties": {
          "projectId": {
            "type": "string",
            "format": "uuid"
          },
          "providerSlug": {
            "type": "string"
          },
          "secretKey": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CredentialView": {
        "type": "object",
        "required": [
          "id",
          "providerSlug",
          "projectId",
          "version",
          "displayHint",
          "verificationState",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "displayHint": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "modelsCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "projectId": {
            "type": "string",
            "format": "uuid"
          },
          "providerSlug": {
            "type": "string"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "verificationState": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Credits": {
        "type": "object",
        "required": [
          "currency",
          "postedNanoeur",
          "reservedNanoeur",
          "availableNanoeur",
          "totalCreditedNanoeur",
          "totalUsedNanoeur",
          "totalReversedNanoeur",
          "debtNanoeur",
          "burnRatePerDayNanoeur",
          "balance",
          "totalPurchased",
          "totalUsed",
          "burnRatePerDay"
        ],
        "properties": {
          "availableNanoeur": {
            "type": "string"
          },
          "balance": {
            "type": "number",
            "format": "double"
          },
          "burnRatePerDay": {
            "type": "number",
            "format": "double"
          },
          "burnRatePerDayNanoeur": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "debtNanoeur": {
            "type": "string"
          },
          "postedNanoeur": {
            "type": "string"
          },
          "reservedNanoeur": {
            "type": "string"
          },
          "totalCreditedNanoeur": {
            "type": "string"
          },
          "totalPurchased": {
            "type": "number",
            "format": "double"
          },
          "totalReversedNanoeur": {
            "type": "string"
          },
          "totalUsed": {
            "type": "number",
            "format": "double"
          },
          "totalUsedNanoeur": {
            "type": "string"
          }
        }
      },
      "DataPolicy": {
        "type": "object",
        "required": [
          "retention",
          "training"
        ],
        "properties": {
          "retention": {
            "type": "string"
          },
          "training": {
            "type": "boolean"
          }
        }
      },
      "DeleteAccount": {
        "type": "object",
        "required": [
          "confirm"
        ],
        "properties": {
          "confirm": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DeletionAccepted": {
        "type": "object",
        "required": [
          "jobId",
          "status"
        ],
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "DeletionReadiness": {
        "type": "object",
        "required": [
          "blockers"
        ],
        "properties": {
          "blockers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Destination": {
        "type": "object",
        "required": [
          "id",
          "name",
          "endpoint",
          "euRegionEvidence",
          "enabled",
          "secretConfigured",
          "consentAt",
          "createdAt"
        ],
        "properties": {
          "consentAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean"
          },
          "endpoint": {
            "type": "string"
          },
          "euRegionEvidence": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "secretConfigured": {
            "type": "boolean"
          }
        }
      },
      "DestinationState": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Document": {
        "type": "object",
        "required": [
          "id",
          "orderId",
          "kind",
          "sequence",
          "documentNumber",
          "issuedAt",
          "currency",
          "creditCents",
          "feeCents",
          "taxCents",
          "grossCents",
          "artifactSha256",
          "artifactRef",
          "recordedAt"
        ],
        "properties": {
          "artifactRef": {
            "type": "string"
          },
          "artifactSha256": {
            "type": "string"
          },
          "creditCents": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "documentNumber": {
            "type": "string"
          },
          "feeCents": {
            "type": "integer",
            "format": "int64"
          },
          "grossCents": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "type": "string"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequence": {
            "type": "integer",
            "format": "int32"
          },
          "taxCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EmptySessions": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {}
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ErrorBody": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        }
      },
      "ExportReadiness": {
        "type": "object",
        "required": [
          "approvedOrigins"
        ],
        "properties": {
          "approvedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "FailedExport": {
        "type": "object",
        "required": [
          "id",
          "destinationId",
          "requestId",
          "attempts",
          "lastError",
          "createdAt"
        ],
        "properties": {
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Filter": {
        "type": "object",
        "properties": {
          "keyIds": {
            "type": [
              "string",
              "null"
            ]
          },
          "models": {
            "type": [
              "string",
              "null"
            ]
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "pageSize": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "providers": {
            "type": [
              "string",
              "null"
            ]
          },
          "range": {
            "type": [
              "string",
              "null"
            ]
          },
          "search": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Generation": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "model",
          "provider",
          "region",
          "location",
          "keyId",
          "source",
          "app",
          "promptTokens",
          "completionTokens",
          "reasoningTokens",
          "cachedTokens",
          "cost",
          "costNanoeur",
          "settlementStatus",
          "executionStatus",
          "latencyMs",
          "durationMs",
          "finishReason",
          "httpStatus",
          "streamed",
          "byok",
          "zeroRetention",
          "promptPreview",
          "completionPreview",
          "fallbackFrom",
          "sessionId",
          "attempts"
        ],
        "properties": {
          "app": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attempt"
            }
          },
          "byok": {
            "type": "boolean"
          },
          "cachedTokens": {
            "type": "integer",
            "format": "int64"
          },
          "completionPreview": {
            "type": [
              "string",
              "null"
            ]
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64"
          },
          "cost": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "costNanoeur": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "executionStatus": {
            "type": "string"
          },
          "fallbackFrom": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "httpStatus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "keyId": {
            "type": "string"
          },
          "latencyMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "location": {
            "type": "string"
          },
          "metadataPurgedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "model": {
            "type": "string"
          },
          "promptPreview": {
            "type": [
              "string",
              "null"
            ]
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "provider": {
            "type": "string"
          },
          "reasoningTokens": {
            "type": "integer",
            "format": "int64"
          },
          "region": {
            "type": "string"
          },
          "sessionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "settlementStatus": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "streamed": {
            "type": "boolean"
          },
          "zeroRetention": {
            "type": "boolean"
          }
        }
      },
      "GenerationPage": {
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize",
          "histogram",
          "granularity"
        ],
        "properties": {
          "granularity": {
            "type": "string"
          },
          "histogram": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistogramBucket"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Generation"
            }
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "pageSize": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "GuardrailPolicy": {
        "type": "object",
        "required": [
          "blockedProviders",
          "blockedModels",
          "blockEmail",
          "blockIban",
          "blockCard",
          "version",
          "updatedAt"
        ],
        "properties": {
          "blockCard": {
            "type": "boolean"
          },
          "blockEmail": {
            "type": "boolean"
          },
          "blockIban": {
            "type": "boolean"
          },
          "blockedModels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockedProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "HistogramBucket": {
        "type": "object",
        "required": [
          "start",
          "requests",
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "integer",
            "format": "int64"
          },
          "requests": {
            "type": "integer",
            "format": "int64"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Invitation": {
        "type": "object",
        "required": [
          "id",
          "email",
          "role",
          "expiresAt"
        ],
        "properties": {
          "acceptedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "Invite": {
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "KeyDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "createdAt",
          "createdBy",
          "lastUsedAt",
          "expiresAt",
          "creditLimit",
          "creditLimitNanoeur",
          "limitReset",
          "usage",
          "usageNanoeur",
          "periodUsage",
          "periodUsageNanoeur",
          "disabled"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "creditLimit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "creditLimitNanoeur": {
            "type": [
              "string",
              "null"
            ]
          },
          "disabled": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "limitReset": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "periodUsage": {
            "type": "number",
            "format": "double"
          },
          "periodUsageNanoeur": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "usage": {
            "type": "number",
            "format": "double"
          },
          "usageNanoeur": {
            "type": "string"
          }
        }
      },
      "KeyPatch": {
        "type": "object",
        "properties": {
          "creditLimitNanoeur": {
            "type": [
              "string",
              "null"
            ]
          },
          "disabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "limitReset": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "Message": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "NotificationSettings": {
        "type": "object",
        "required": [
          "emailEnabled",
          "emailConfigured",
          "thresholdCents",
          "availableNanoeur",
          "lowBalance"
        ],
        "properties": {
          "availableNanoeur": {
            "type": "string"
          },
          "emailConfigured": {
            "type": "boolean"
          },
          "emailEnabled": {
            "type": "boolean"
          },
          "lastSubmittedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lowBalance": {
            "type": "boolean"
          },
          "thresholdCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "NotificationSettingsInput": {
        "type": "object",
        "required": [
          "emailEnabled",
          "thresholdCents"
        ],
        "properties": {
          "emailEnabled": {
            "type": "boolean"
          },
          "thresholdCents": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "OrderView": {
        "type": "object",
        "required": [
          "id",
          "creditCents",
          "feeCents",
          "taxCents",
          "amountCents",
          "creditNanoeur",
          "currency",
          "status",
          "checkoutUrl",
          "createdAt",
          "fundedAt",
          "refundedCents",
          "chargedBackCents",
          "reversedCreditNanoeur",
          "invoiceState"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "chargedBackCents": {
            "type": "integer",
            "format": "int64"
          },
          "checkoutUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "creditCents": {
            "type": "integer",
            "format": "int64"
          },
          "creditNanoeur": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "feeCents": {
            "type": "integer",
            "format": "int64"
          },
          "fundedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceState": {
            "type": "string"
          },
          "refundedCents": {
            "type": "integer",
            "format": "int64"
          },
          "reversedCreditNanoeur": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "taxCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Organization": {
        "type": "object",
        "required": [
          "id",
          "name",
          "slug"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "OrganizationPatch": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PolicyInput": {
        "type": "object",
        "required": [
          "blockedProviders",
          "blockedModels",
          "blockEmail",
          "blockIban",
          "blockCard",
          "expectedVersion"
        ],
        "properties": {
          "blockCard": {
            "type": "boolean"
          },
          "blockEmail": {
            "type": "boolean"
          },
          "blockIban": {
            "type": "boolean"
          },
          "blockedModels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockedProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expectedVersion": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Preset": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "model",
          "systemPrompt",
          "params",
          "version",
          "updatedAt"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "model": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/PresetParameters"
          },
          "systemPrompt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PresetInput": {
        "type": "object",
        "required": [
          "name",
          "description",
          "model",
          "systemPrompt",
          "params"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "expectedVersion": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "model": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/PresetParameters"
          },
          "systemPrompt": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PresetParameters": {
        "type": "object",
        "properties": {
          "maxTokens": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "presencePenalty": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "topP": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "PrivacyPatch": {
        "type": "object",
        "required": [
          "euOnlyRouting",
          "euOperatedOnly",
          "zeroDataRetention",
          "allowTrainingProviders",
          "logContent",
          "metadataRetentionDays"
        ],
        "properties": {
          "allowTrainingProviders": {
            "type": "boolean"
          },
          "euOnlyRouting": {
            "type": "boolean"
          },
          "euOperatedOnly": {
            "type": "boolean"
          },
          "logContent": {
            "type": "boolean"
          },
          "maxKeyLifetimeDays": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "metadataRetentionDays": {
            "type": "integer",
            "format": "int32"
          },
          "zeroDataRetention": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PrivacySettings": {
        "type": "object",
        "required": [
          "euOnlyRouting",
          "euOperatedOnly",
          "zeroDataRetention",
          "allowTrainingProviders",
          "logContent",
          "metadataRetentionDays",
          "maxKeyLifetimeDays"
        ],
        "properties": {
          "allowTrainingProviders": {
            "type": "boolean"
          },
          "euOnlyRouting": {
            "type": "boolean"
          },
          "euOperatedOnly": {
            "type": "boolean"
          },
          "logContent": {
            "type": "boolean"
          },
          "maxKeyLifetimeDays": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "metadataRetentionDays": {
            "type": "integer",
            "format": "int32"
          },
          "zeroDataRetention": {
            "type": "boolean"
          }
        }
      },
      "PublicModel": {
        "type": "object",
        "required": [
          "id",
          "object",
          "owned_by"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "owned_by": {
            "type": "string"
          }
        }
      },
      "PublicRoute": {
        "type": "object",
        "description": "Public route facts intentionally exclude supplier credentials and internal cost prices.",
        "required": [
          "slug",
          "modelSlug",
          "modelName",
          "author",
          "providerSlug",
          "providerName",
          "contextWindow",
          "country",
          "region",
          "chat",
          "retention",
          "inputNanoeurPerToken",
          "outputNanoeurPerToken",
          "policyRevision",
          "customerPriceRevision"
        ],
        "properties": {
          "author": {
            "type": "string"
          },
          "chat": {
            "type": "boolean"
          },
          "contextWindow": {
            "type": "integer",
            "format": "int32"
          },
          "country": {
            "type": "string"
          },
          "customerPriceRevision": {
            "type": "string"
          },
          "inputNanoeurPerToken": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "modelSlug": {
            "type": "string"
          },
          "outputNanoeurPerToken": {
            "type": "string"
          },
          "policyRevision": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "providerSlug": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "retention": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "QuoteView": {
        "type": "object",
        "required": [
          "creditCents",
          "feeCents",
          "taxCents",
          "amountCents",
          "currency",
          "taxPolicyId"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "creditCents": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "feeCents": {
            "type": "integer",
            "format": "int64"
          },
          "taxCents": {
            "type": "integer",
            "format": "int64"
          },
          "taxPolicyId": {
            "type": "string"
          }
        }
      },
      "RoleChange": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "RoutingPatch": {
        "type": "object",
        "required": [
          "defaultModel",
          "sort",
          "allowFallbacks",
          "allowedProviders",
          "ignoredProviders"
        ],
        "properties": {
          "allowFallbacks": {
            "type": "boolean"
          },
          "allowedProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "defaultModel": {
            "type": "string"
          },
          "ignoredProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxOutputPriceNanoeurPerToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "RoutingSettings": {
        "type": "object",
        "required": [
          "defaultModel",
          "sort",
          "allowFallbacks",
          "allowedProviders",
          "ignoredProviders",
          "maxOutputPrice",
          "maxOutputPriceNanoeurPerToken"
        ],
        "properties": {
          "allowFallbacks": {
            "type": "boolean"
          },
          "allowedProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "defaultModel": {
            "type": "string"
          },
          "ignoredProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxOutputPrice": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "maxOutputPriceNanoeurPerToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort": {
            "type": "string"
          }
        }
      },
      "TeamMember": {
        "type": "object",
        "required": [
          "id",
          "role",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string"
          }
        }
      },
      "TeamOrganization": {
        "type": "object",
        "required": [
          "id",
          "name",
          "role"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "TransactionView": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "type",
          "description",
          "creditsNanoeur",
          "credits",
          "charged",
          "paymentMethodId",
          "invoiceId",
          "status"
        ],
        "properties": {
          "charged": {
            "type": "number",
            "format": "double"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "credits": {
            "type": "number",
            "format": "double"
          },
          "creditsNanoeur": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "paymentMethodId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "UsageBucket": {
        "type": "object",
        "required": [
          "start",
          "model",
          "provider",
          "keyId",
          "requests",
          "promptTokens",
          "completionTokens",
          "cachedTokens",
          "cost",
          "costNanoeur",
          "pendingRequests"
        ],
        "properties": {
          "cachedTokens": {
            "type": "integer",
            "format": "int64"
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64"
          },
          "cost": {
            "type": "number",
            "format": "double"
          },
          "costNanoeur": {
            "type": "string"
          },
          "keyId": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "pendingRequests": {
            "type": "integer",
            "format": "int64"
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "provider": {
            "type": "string"
          },
          "requests": {
            "type": "integer",
            "format": "int64"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UsageSeries": {
        "type": "object",
        "required": [
          "granularity",
          "periods",
          "buckets"
        ],
        "properties": {
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageBucket"
            }
          },
          "granularity": {
            "type": "string"
          },
          "periods": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "EU Router",
      "description": "EU Router product API"
    }
  ]
}