{
  "openapi": "3.1.0",
  "info": {
    "title": "Pura LLM Developer API",
    "version": "2026-10-01",
    "description": "Registered application OAuth and shared subscription inference. No provider credentials are returned to partner applications. Availability depends on the deployed release and configured models."
  },
  "paths": {
    "/v1/integrations/oauth/authorize": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Browser Authorize",
        "operationId": "browser_authorize_v1_integrations_oauth_authorize_get",
        "parameters": [
          {
            "name": "client_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Redirect Uri"
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code Challenge"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 512,
              "title": "State"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "inference usage:read",
              "title": "Scope"
            }
          },
          {
            "name": "response_type",
            "in": "query",
            "required": false,
            "schema": {
              "const": "code",
              "type": "string",
              "default": "code",
              "title": "Response Type"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "required": false,
            "schema": {
              "const": "S256",
              "type": "string",
              "default": "S256",
              "title": "Code Challenge Method"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "it",
                "en"
              ],
              "type": "string",
              "default": "it",
              "title": "Locale"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "oauth_public"
      },
      "post": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Authorize",
        "operationId": "authorize_v1_integrations_oauth_authorize_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session"
      }
    },
    "/v1/integrations/apps": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "List Apps",
        "operationId": "list_apps_v1_integrations_apps_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      },
      "post": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Register App",
        "operationId": "register_app_v1_integrations_apps_post",
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/apps/{client_id}/icon": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "App Icon",
        "operationId": "app_icon_v1_integrations_apps__client_id__icon_get",
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session"
      }
    },
    "/v1/integrations/apps/{client_id}/rotate-secret": {
      "post": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Rotate App Secret",
        "operationId": "rotate_app_secret_v1_integrations_apps__client_id__rotate_secret_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/apps/{client_id}": {
      "patch": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Update App State",
        "operationId": "update_app_state_v1_integrations_apps__client_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppState"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      },
      "delete": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Delete App",
        "operationId": "delete_app_v1_integrations_apps__client_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/connections": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "List Connections",
        "operationId": "list_connections_v1_integrations_connections_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session"
      }
    },
    "/v1/integrations/apps/{client_id}/webhook": {
      "put": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Configure Webhook",
        "operationId": "configure_webhook_v1_integrations_apps__client_id__webhook_put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookConfiguration"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      },
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Get Webhook",
        "operationId": "get_webhook_v1_integrations_apps__client_id__webhook_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/apps/{client_id}/webhook/test": {
      "post": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Test Webhook",
        "operationId": "test_webhook_v1_integrations_apps__client_id__webhook_test_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/apps/{client_id}/webhook/events": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Webhook Events",
        "operationId": "webhook_events_v1_integrations_apps__client_id__webhook_events_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/apps/{client_id}/webhook/events/{event_id}/recover": {
      "post": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Recover Webhook",
        "operationId": "recover_webhook_v1_integrations_apps__client_id__webhook_events__event_id__recover_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRecovery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session",
        "x-pura-account-type": "business"
      }
    },
    "/v1/integrations/connections/{client_id}": {
      "delete": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Disconnect",
        "operationId": "disconnect_v1_integrations_connections__client_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session"
      }
    },
    "/v1/integrations/oauth/consent": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Consent Details",
        "operationId": "consent_details_v1_integrations_oauth_consent_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "client_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Client Id"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Redirect Uri"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Scope"
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code Challenge"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "required": true,
            "schema": {
              "const": "S256",
              "type": "string",
              "title": "Code Challenge Method"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "console_session"
      }
    },
    "/v1/integrations/oauth/token": {
      "post": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Token",
        "operationId": "token_v1_integrations_oauth_token_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_token_v1_integrations_oauth_token_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-pura-auth": "oauth_public"
      }
    },
    "/v1/integrations/usage": {
      "get": {
        "tags": [
          "Applications and OAuth"
        ],
        "summary": "Integration Usage",
        "operationId": "integration_usage_v1_integrations_usage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-scope": "usage:read",
        "x-pura-auth": "oauth_access_token"
      }
    },
    "/v1/integrations/inference/audio/transcriptions": {
      "post": {
        "tags": [
          "Delegated inference"
        ],
        "summary": "Transcribe",
        "operationId": "transcribe_v1_integrations_inference_audio_transcriptions_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-scope": "inference",
        "x-pura-auth": "oauth_access_token",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "language": {
                    "anyOf": [
                      {
                        "pattern": "^[a-z]{2}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Language"
                  },
                  "prompt": {
                    "anyOf": [
                      {
                        "maxLength": 4000,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Prompt"
                  },
                  "temperature": {
                    "anyOf": [
                      {
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Temperature"
                  },
                  "response_format": {
                    "default": "json",
                    "enum": [
                      "json",
                      "verbose_json"
                    ],
                    "title": "Response Format",
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "One nonempty audio file, at most 25,000,000 bytes."
                  }
                },
                "title": "TranscriptionFields",
                "type": "object",
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/integrations/inference/capabilities": {
      "get": {
        "tags": [
          "Delegated inference"
        ],
        "summary": "Capabilities",
        "operationId": "capabilities_v1_integrations_inference_capabilities_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceCapabilities"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-scope": "inference",
        "x-pura-auth": "oauth_access_token"
      }
    },
    "/v1/integrations/inference/chat/completions": {
      "post": {
        "tags": [
          "Delegated inference"
        ],
        "summary": "Chat",
        "operationId": "chat_v1_integrations_inference_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-scope": "inference",
        "x-pura-auth": "oauth_access_token"
      }
    },
    "/v1/subscriptions/checkout/confirm": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Confirm",
        "operationId": "confirm_v1_subscriptions_checkout_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutConfirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session"
      }
    },
    "/v1/subscriptions": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Current Subscription",
        "operationId": "current_subscription_v1_subscriptions_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session"
      }
    },
    "/v1/subscriptions/checkout": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Checkout",
        "operationId": "checkout_v1_subscriptions_checkout_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session"
      }
    },
    "/v1/subscriptions/portal": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Portal",
        "operationId": "portal_v1_subscriptions_portal_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session"
      }
    },
    "/v1/subscriptions/plans": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Plans",
        "operationId": "plans_v1_subscriptions_plans_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-pura-auth": "public"
      }
    },
    "/v1/subscriptions/usage": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Usage",
        "operationId": "usage_v1_subscriptions_usage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "x-pura-auth": "console_session"
      }
    }
  },
  "components": {
    "schemas": {
      "AppState": {
        "properties": {
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "type": "object",
        "required": [
          "active"
        ],
        "title": "AppState"
      },
      "Body_token_v1_integrations_oauth_token_post": {
        "properties": {
          "grant_type": {
            "type": "string",
            "title": "Grant Type"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Secret"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "redirect_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Uri"
          },
          "code_verifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code Verifier"
          },
          "refresh_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refresh Token"
          }
        },
        "type": "object",
        "required": [
          "grant_type",
          "client_id"
        ],
        "title": "Body_token_v1_integrations_oauth_token_post"
      },
      "ChatRequest": {
        "properties": {
          "messages": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "minItems": 1,
            "title": "Messages"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "stream_options": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream Options"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "max_completion_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Completion Tokens"
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Choice"
          },
          "parallel_tool_calls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Tool Calls"
          },
          "response_format": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format"
          },
          "reasoning_effort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Effort"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "messages"
        ],
        "title": "ChatRequest"
      },
      "CheckoutConfirmation": {
        "properties": {
          "session_id": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Session Id"
          }
        },
        "type": "object",
        "required": [
          "session_id"
        ],
        "title": "CheckoutConfirmation"
      },
      "CheckoutRequest": {
        "properties": {
          "plan_id": {
            "type": "string",
            "title": "Plan Id"
          },
          "success_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Success Url"
          },
          "cancel_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Cancel Url"
          }
        },
        "type": "object",
        "required": [
          "plan_id",
          "success_url",
          "cancel_url"
        ],
        "title": "CheckoutRequest"
      },
      "ConsentRequest": {
        "properties": {
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "redirect_uri": {
            "type": "string",
            "maxLength": 2048,
            "title": "Redirect Uri"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": "inference usage:read"
          },
          "code_challenge": {
            "type": "string",
            "title": "Code Challenge"
          },
          "code_challenge_method": {
            "type": "string",
            "const": "S256",
            "title": "Code Challenge Method"
          },
          "state": {
            "type": "string",
            "maxLength": 512,
            "minLength": 16,
            "title": "State"
          },
          "approved": {
            "type": "boolean",
            "title": "Approved"
          }
        },
        "type": "object",
        "required": [
          "client_id",
          "redirect_uri",
          "code_challenge",
          "code_challenge_method",
          "state",
          "approved"
        ],
        "title": "ConsentRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InferenceCapabilities": {
        "properties": {
          "object": {
            "type": "string",
            "const": "capabilities",
            "title": "Object",
            "default": "capabilities"
          },
          "services": {
            "$ref": "#/components/schemas/ServiceCapabilities"
          }
        },
        "type": "object",
        "required": [
          "services"
        ],
        "title": "InferenceCapabilities"
      },
      "PortalRequest": {
        "properties": {
          "return_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Return Url"
          }
        },
        "type": "object",
        "required": [
          "return_url"
        ],
        "title": "PortalRequest"
      },
      "ServiceCapabilities": {
        "properties": {
          "chat": {
            "type": "boolean",
            "title": "Chat"
          },
          "audio_transcription": {
            "type": "boolean",
            "title": "Audio Transcription"
          }
        },
        "type": "object",
        "required": [
          "chat",
          "audio_transcription"
        ],
        "title": "ServiceCapabilities"
      },
      "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"
      },
      "WebhookConfiguration": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "WebhookConfiguration"
      },
      "WebhookRecovery": {
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "retry",
              "skip"
            ],
            "title": "Action"
          }
        },
        "type": "object",
        "required": [
          "action"
        ],
        "title": "WebhookRecovery"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://ai.puradigital.it",
      "description": "/v1 is included in each path"
    }
  ]
}
