{"openapi":"3.1.0","info":{"title":"FastVision AI API","description":"Self-hosted OCR and Text-to-Speech platform. Authenticate with a Bearer access token (dashboard) or an `X-API-Key: fv_live_...` header (programmatic).","version":"1.0.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Liveness probe","description":"Cheap liveness check — no external dependencies touched.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/health/ready":{"get":{"tags":["health"],"summary":"Readiness probe (db + redis)","description":"Probe Postgres and Redis; 200 when ready, 503 with a degraded report otherwise.","operationId":"ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health":{"get":{"tags":["health"],"summary":"Liveness probe","description":"Cheap liveness check — no external dependencies touched.","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Api V1 Health Get"}}}}}}},"/api/v1/health/ready":{"get":{"tags":["health"],"summary":"Readiness probe (db + redis)","description":"Probe Postgres and Redis; 200 when ready, 503 with a degraded report otherwise.","operationId":"ready_api_v1_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/register":{"post":{"tags":["auth"],"summary":"Create an account","description":"Create user + Personal organization, then email a verification link.","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Log in with email + password","description":"Return a token pair, or a 2FA challenge when TOTP is enabled.","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/2fa/verify":{"post":{"tags":["auth"],"summary":"Complete a 2FA login","operationId":"two_fa_verify_api_v1_auth_2fa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFAVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Rotate a refresh token","operationId":"refresh_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Revoke a refresh token","operationId":"logout_api_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Request a password-reset email","description":"Always 202 — the response never reveals whether the account exists.","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Set a new password","description":"Single-use token; on success every refresh token is revoked.","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Confirm an email address","operationId":"verify_email_api_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Re-send the verification email","description":"Always 202 — no account-existence or verification-state oracle.","operationId":"resend_verification_api_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/2fa/setup":{"post":{"tags":["auth"],"summary":"Begin TOTP enrollment","description":"Store an unconfirmed secret; 2FA activates only after /2fa/enable.","operationId":"two_fa_setup_api_v1_auth_2fa_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFASetupOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/2fa/enable":{"post":{"tags":["auth"],"summary":"Confirm and enable TOTP","operationId":"two_fa_enable_api_v1_auth_2fa_enable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFACodeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/2fa/disable":{"post":{"tags":["auth"],"summary":"Disable TOTP","operationId":"two_fa_disable_api_v1_auth_2fa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFACodeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/me":{"get":{"tags":["users"],"summary":"Get the current profile","operationId":"get_me_api_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]},"patch":{"tags":["users"],"summary":"Update the current profile","operationId":"update_me_api_v1_users_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/users/me/password":{"post":{"tags":["users"],"summary":"Change password","description":"Verify the current password; on success all refresh tokens are revoked.","operationId":"change_password_api_v1_users_me_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/api-keys":{"get":{"tags":["api-keys"],"summary":"List API keys","operationId":"list_api_keys_api_v1_api_keys_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ApiKeyOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api-keys"],"summary":"Create an API key (secret shown once)","operationId":"create_api_key_api_v1_api_keys_post","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}":{"get":{"tags":["api-keys"],"summary":"Get one API key","operationId":"get_api_key_api_v1_api_keys__key_id__get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["api-keys"],"summary":"Update an API key","operationId":"update_api_key_api_v1_api_keys__key_id__patch","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["api-keys"],"summary":"Delete an API key","operationId":"delete_api_key_api_v1_api_keys__key_id__delete","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}/rotate":{"post":{"tags":["api-keys"],"summary":"Rotate the secret (shown once)","operationId":"rotate_api_key_api_v1_api_keys__key_id__rotate_post","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}/usage":{"get":{"tags":["api-keys"],"summary":"30-day usage by metric","operationId":"api_key_usage_api_v1_api_keys__key_id__usage_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUsageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects":{"get":{"tags":["projects"],"summary":"List projects","operationId":"list_projects_api_v1_projects_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProjectOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["projects"],"summary":"Create a project","operationId":"create_project_api_v1_projects_post","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get a project","operationId":"get_project_api_v1_projects__project_id__get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["projects"],"summary":"Update a project","operationId":"update_project_api_v1_projects__project_id__patch","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete a project","operationId":"delete_project_api_v1_projects__project_id__delete","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ocr/image":{"post":{"tags":["ocr"],"summary":"OCR an image (PNG/JPEG/WEBP/TIFF)","operationId":"ocr_image_api_v1_ocr_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ocr_image_api_v1_ocr_image_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JobResource"},{"$ref":"#/components/schemas/JobBatch"}],"title":"Response Ocr Image Api V1 Ocr Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/ocr/pdf":{"post":{"tags":["ocr"],"summary":"OCR a PDF document","operationId":"ocr_pdf_api_v1_ocr_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ocr_pdf_api_v1_ocr_pdf_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JobResource"},{"$ref":"#/components/schemas/JobBatch"}],"title":"Response Ocr Pdf Api V1 Ocr Pdf Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/ocr/document":{"post":{"tags":["ocr"],"summary":"OCR an image or PDF","operationId":"ocr_document_api_v1_ocr_document_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ocr_document_api_v1_ocr_document_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JobResource"},{"$ref":"#/components/schemas/JobBatch"}],"title":"Response Ocr Document Api V1 Ocr Document Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/tts":{"post":{"tags":["tts"],"summary":"Create a text-to-speech job","operationId":"create_tts_job_api_v1_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsCreate"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/voices":{"get":{"tags":["tts"],"summary":"List available voices","operationId":"list_voices_api_v1_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicesOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/stream":{"post":{"tags":["tts"],"summary":"Stream synthesized speech as chunked audio/wav","operationId":"stream_tts_api_v1_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsStreamRequest"}}},"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":[]},{"APIKeyHeader":[]}]}},"/api/v1/download":{"post":{"tags":["tts"],"summary":"Download a finished TTS job's audio","operationId":"download_tts_audio_api_v1_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsDownloadRequest"}}},"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":[]},{"APIKeyHeader":[]}]}},"/api/v1/stt/audio":{"post":{"tags":["stt"],"summary":"Transcribe an audio file to text (MP3/WAV/OGG/M4A/FLAC/WEBM)","operationId":"stt_audio_api_v1_stt_audio_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_stt_audio_api_v1_stt_audio_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JobResource"},{"$ref":"#/components/schemas/JobBatch"}],"title":"Response Stt Audio Api V1 Stt Audio Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/stt/transcribe":{"post":{"tags":["stt"],"summary":"Transcribe an audio file to text (alias of /stt/audio)","operationId":"stt_transcribe_api_v1_stt_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_stt_transcribe_api_v1_stt_transcribe_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JobResource"},{"$ref":"#/components/schemas/JobBatch"}],"title":"Response Stt Transcribe Api V1 Stt Transcribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/jobs":{"get":{"tags":["jobs"],"summary":"List jobs","operationId":"list_jobs_api_v1_jobs_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ocr | tts","title":"Type"},"description":"ocr | tts"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"queued|processing|succeeded|failed|canceled","title":"Status"},"description":"queued|processing|succeeded|failed|canceled"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_JobResource_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get a job","operationId":"get_job_api_v1_jobs__job_id__get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["jobs"],"summary":"Delete (or cancel) a job","operationId":"remove_job_api_v1_jobs__job_id__delete","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/result":{"get":{"tags":["jobs"],"summary":"Full result JSON of a finished job","operationId":"get_job_result_api_v1_jobs__job_id__result_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Job Result Api V1 Jobs  Job Id  Result Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/download":{"get":{"tags":["jobs"],"summary":"Download a job output artifact","operationId":"download_job_output_api_v1_jobs__job_id__download_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"txt | json | pdf | audio","title":"Format"},"description":"txt | json | pdf | audio"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files":{"get":{"tags":["files"],"summary":"List stored files","operationId":"list_files_api_v1_files_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"upload | result | audio | temp","title":"Kind"},"description":"upload | result | audio | temp"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FileOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/content":{"get":{"tags":["files"],"summary":"Download a stored object by key (local-backend URL)","operationId":"download_by_key_api_v1_files_content_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}":{"delete":{"tags":["files"],"summary":"Delete a stored file","operationId":"delete_file_api_v1_files__file_id__delete","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}/download":{"get":{"tags":["files"],"summary":"Download a stored file","operationId":"download_file_api_v1_files__file_id__download_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/summary":{"get":{"tags":["usage"],"summary":"Usage Summary","description":"Current calendar-month totals per metric vs the plan quota (+ percent).","operationId":"usage_summary_api_v1_usage_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/usage/timeseries":{"get":{"tags":["usage"],"summary":"Usage Timeseries","description":"Daily `[{date, value}]` buckets for the last *days* days (zero-filled).","operationId":"usage_timeseries_api_v1_usage_timeseries_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"metric","in":"query","required":false,"schema":{"type":"string","description":"one of ['ocr_pages', 'tts_characters', 'requests', 'storage_bytes', 'bandwidth_bytes', 'errors', 'latency_ms']","default":"requests","title":"Metric"},"description":"one of ['ocr_pages', 'tts_characters', 'requests', 'storage_bytes', 'bandwidth_bytes', 'errors', 'latency_ms']"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TimeseriesPoint"},"title":"Response Usage Timeseries Api V1 Usage Timeseries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/plans":{"get":{"tags":["billing"],"summary":"List Plans","description":"Public plan catalog built from ``app.core.quotas.PLANS``.","operationId":"list_plans_api_v1_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanOut"},"type":"array","title":"Response List Plans Api V1 Billing Plans Get"}}}}}}},"/api/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","description":"Current plan (+ full plan definition) and the subscriptions row if any.","operationId":"get_subscription_api_v1_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscriptionOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Start a plan change: Stripe Checkout in real mode, instant switch in mock.","operationId":"create_checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUrlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","description":"Stripe billing-portal URL in real mode; the billing page itself in mock.","operationId":"create_portal_api_v1_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUrlOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/billing/invoices":{"get":{"tags":["billing"],"summary":"List Invoices","description":"The caller's invoices, newest first.","operationId":"list_invoices_api_v1_billing_invoices_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InvoiceOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Inbound Stripe webhook: raw-body signature verification, then dispatch.","operationId":"stripe_webhook_api_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List webhook endpoints","operationId":"list_webhooks_api_v1_webhooks_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WebhookEndpointOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Create a webhook endpoint (secret shown once)","operationId":"create_webhook_api_v1_webhooks_post","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreatedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{endpoint_id}":{"patch":{"tags":["webhooks"],"summary":"Update an endpoint","operationId":"update_webhook_api_v1_webhooks__endpoint_id__patch","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete an endpoint","operationId":"delete_webhook_api_v1_webhooks__endpoint_id__delete","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{endpoint_id}/test":{"post":{"tags":["webhooks"],"summary":"Send a test event to this endpoint","operationId":"test_webhook_api_v1_webhooks__endpoint_id__test_post","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{endpoint_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"Delivery history for this endpoint","operationId":"list_deliveries_api_v1_webhooks__endpoint_id__deliveries_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WebhookDeliveryOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/logs/requests":{"get":{"tags":["logs"],"summary":"Own API request logs","operationId":"list_request_logs_api_v1_logs_requests_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"lookback window in days","default":7,"title":"Days"},"description":"lookback window in days"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ApiRequestLogOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/logs/audit":{"get":{"tags":["logs"],"summary":"Own audit trail","operationId":"list_audit_logs_api_v1_logs_audit_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AuditLogOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team":{"get":{"tags":["team"],"summary":"Organization and its members","operationId":"get_team_api_v1_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/team/invite":{"post":{"tags":["team"],"summary":"Invite a member by email","operationId":"invite_member_api_v1_team_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInviteRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/team/members/{member_id}":{"patch":{"tags":["team"],"summary":"Change a member's role","operationId":"update_member_api_v1_team_members__member_id__patch","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["team"],"summary":"Remove a member","operationId":"remove_member_api_v1_team_members__member_id__delete","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/stats":{"get":{"tags":["admin"],"summary":"Platform-wide counters","operationId":"admin_stats_api_v1_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatsOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/admin/users":{"get":{"tags":["admin"],"summary":"All users (searchable)","operationId":"admin_list_users_api_v1_admin_users_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"description":"email/name substring","title":"Search"},"description":"email/name substring"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AdminUserOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}":{"patch":{"tags":["admin"],"summary":"Update a user","operationId":"admin_update_user_api_v1_admin_users__user_id__patch","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/jobs":{"get":{"tags":["admin"],"summary":"All jobs (filterable)","operationId":"admin_list_jobs_api_v1_admin_jobs_get","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(ocr|tts)$"},{"type":"null"}],"title":"Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(queued|processing|succeeded|failed|canceled)$"},{"type":"null"}],"title":"Status"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"1-based page number","default":1,"title":"Page"},"description":"1-based page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"items per page (max 100)","default":20,"title":"Page Size"},"description":"items per page (max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AdminJobOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/queues":{"get":{"tags":["admin"],"summary":"Celery queue depths","operationId":"admin_queues_api_v1_admin_queues_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminQueuesOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/admin/workers":{"get":{"tags":["admin"],"summary":"Celery workers (2s probe)","operationId":"admin_workers_api_v1_admin_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWorkersOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/admin/models":{"get":{"tags":["admin"],"summary":"Model weight presence","operationId":"admin_models_api_v1_admin_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminModelsOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}},"/api/v1/admin/revenue":{"get":{"tags":["admin"],"summary":"MRR estimate + invoice history","operationId":"admin_revenue_api_v1_admin_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRevenueOut"}}}}},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}]}}},"components":{"schemas":{"AdminJobOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority"},"pages":{"type":"integer","title":"Pages"},"characters":{"type":"integer","title":"Characters"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["id","user_id","type","status","priority","pages","characters","created_at"],"title":"AdminJobOut","description":"Row of GET /admin/jobs (all users)."},"AdminModelsOut":{"properties":{"ai_mode":{"type":"string","title":"Ai Mode"},"models_dir":{"type":"string","title":"Models Dir"},"ocr_engine":{"type":"string","title":"Ocr Engine"},"tts_engine":{"type":"string","title":"Tts Engine"},"models":{"items":{"$ref":"#/components/schemas/ModelStatusOut"},"type":"array","title":"Models"}},"type":"object","required":["ai_mode","models_dir","ocr_engine","tts_engine","models"],"title":"AdminModelsOut","description":"GET /admin/models."},"AdminQueuesOut":{"properties":{"connected":{"type":"boolean","title":"Connected"},"queues":{"items":{"$ref":"#/components/schemas/QueueDepthOut"},"type":"array","title":"Queues"}},"type":"object","required":["connected","queues"],"title":"AdminQueuesOut","description":"GET /admin/queues."},"AdminRevenueOut":{"properties":{"mrr_cents":{"type":"integer","title":"Mrr Cents"},"paying_users":{"type":"integer","title":"Paying Users"},"enterprise_users":{"type":"integer","title":"Enterprise Users"},"by_plan":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Plan"},"months":{"items":{"$ref":"#/components/schemas/RevenueMonthOut"},"type":"array","title":"Months"}},"type":"object","required":["mrr_cents","paying_users","enterprise_users","by_plan","months"],"title":"AdminRevenueOut","description":"GET /admin/revenue — MRR estimate + last-6-months invoice totals."},"AdminStatsOut":{"properties":{"users":{"additionalProperties":{"type":"integer"},"type":"object","title":"Users"},"jobs":{"additionalProperties":true,"type":"object","title":"Jobs"},"usage_month":{"additionalProperties":{"type":"number"},"type":"object","title":"Usage Month"},"requests_24h":{"additionalProperties":{"type":"number"},"type":"object","title":"Requests 24H"}},"type":"object","required":["users","jobs","usage_month","requests_24h"],"title":"AdminStatsOut","description":"GET /admin/stats — platform-wide counters."},"AdminUserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"is_active":{"type":"boolean","title":"Is Active"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_superuser":{"type":"boolean","title":"Is Superuser"},"totp_enabled":{"type":"boolean","title":"Totp Enabled"},"plan":{"type":"string","title":"Plan"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","full_name","is_active","is_verified","is_superuser","totp_enabled","plan","created_at"],"title":"AdminUserOut","description":"Row of GET /admin/users."},"AdminUserUpdate":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser"}},"type":"object","title":"AdminUserUpdate","description":"PATCH /admin/users/{id} body (all optional)."},"AdminWorkerOut":{"properties":{"name":{"type":"string","title":"Name"},"alive":{"type":"boolean","title":"Alive"},"stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Stats"}},"type":"object","required":["name","alive"],"title":"AdminWorkerOut","description":"One Celery worker as seen by control.inspect."},"AdminWorkersOut":{"properties":{"count":{"type":"integer","title":"Count"},"workers":{"items":{"$ref":"#/components/schemas/AdminWorkerOut"},"type":"array","title":"Workers"}},"type":"object","required":["count","workers"],"title":"AdminWorkersOut","description":"GET /admin/workers."},"ApiKeyCreateIn":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"rate_limit_per_minute":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Minute"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["name"],"title":"ApiKeyCreateIn"},"ApiKeyCreatedOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"rate_limit_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Minute"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","prefix","project_id","scopes","rate_limit_per_minute","is_active","last_used_at","expires_at","created_at","key"],"title":"ApiKeyCreatedOut","description":"Create/rotate response — the only place the full secret is returned."},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"rate_limit_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Minute"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","prefix","project_id","scopes","rate_limit_per_minute","is_active","last_used_at","expires_at","created_at"],"title":"ApiKeyOut"},"ApiKeyUpdateIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"rate_limit_per_minute":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Minute"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"ApiKeyUpdateIn","description":"PATCH body — only fields explicitly provided are applied."},"ApiKeyUsageOut":{"properties":{"api_key_id":{"type":"string","format":"uuid","title":"Api Key Id"},"days":{"type":"integer","title":"Days","default":30},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"metrics":{"additionalProperties":{"type":"number"},"type":"object","title":"Metrics"}},"type":"object","required":["api_key_id","period_start","period_end","metrics"],"title":"ApiKeyUsageOut","description":"30-day usage aggregation for one key, grouped by metric."},"ApiRequestLogOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"status_code":{"type":"integer","title":"Status Code"},"latency_ms":{"type":"integer","title":"Latency Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","method","path","status_code","latency_ms","created_at"],"title":"ApiRequestLogOut","description":"Row of GET /logs/requests."},"AuditLogOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"actor_type":{"type":"string","title":"Actor Type"},"action":{"type":"string","title":"Action"},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","actor_type","action","created_at"],"title":"AuditLogOut","description":"Row of GET /logs/audit."},"BillingSubscriptionOut":{"properties":{"plan":{"type":"string","title":"Plan"},"plan_details":{"$ref":"#/components/schemas/PlanOut"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionOut"},{"type":"null"}]}},"type":"object","required":["plan","plan_details"],"title":"BillingSubscriptionOut","description":"GET /billing/subscription — user plan + subscription row when present."},"Body_ocr_document_api_v1_ocr_document_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"languages":{"type":"string","title":"Languages","default":"en"},"doc_type":{"type":"string","title":"Doc Type","default":"generic"},"outputs":{"type":"string","title":"Outputs","default":"json,txt"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority","default":0},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"Body_ocr_document_api_v1_ocr_document_post"},"Body_ocr_image_api_v1_ocr_image_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"languages":{"type":"string","title":"Languages","default":"en"},"doc_type":{"type":"string","title":"Doc Type","default":"generic"},"outputs":{"type":"string","title":"Outputs","default":"json,txt"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority","default":0},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"Body_ocr_image_api_v1_ocr_image_post"},"Body_ocr_pdf_api_v1_ocr_pdf_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"languages":{"type":"string","title":"Languages","default":"en"},"doc_type":{"type":"string","title":"Doc Type","default":"generic"},"outputs":{"type":"string","title":"Outputs","default":"json,txt"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority","default":0},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"Body_ocr_pdf_api_v1_ocr_pdf_post"},"Body_stt_audio_api_v1_stt_audio_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"model":{"type":"string","title":"Model","default":""},"outputs":{"type":"string","title":"Outputs","default":"json,txt"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority","default":0},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"Body_stt_audio_api_v1_stt_audio_post"},"Body_stt_transcribe_api_v1_stt_transcribe_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"model":{"type":"string","title":"Model","default":""},"outputs":{"type":"string","title":"Outputs","default":"json,txt"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority","default":0},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"Body_stt_transcribe_api_v1_stt_transcribe_post"},"CheckoutRequest":{"properties":{"plan":{"type":"string","maxLength":32,"minLength":1,"title":"Plan"}},"type":"object","required":["plan"],"title":"CheckoutRequest","description":"POST /billing/checkout body."},"CheckoutUrlOut":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutUrlOut","description":"POST /billing/checkout and /billing/portal response."},"FileOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"key":{"type":"string","title":"Key"},"size_bytes":{"type":"integer","title":"Size Bytes"},"content_type":{"type":"string","title":"Content Type"},"kind":{"type":"string","title":"Kind"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","job_id","key","size_bytes","content_type","kind","created_at","expires_at"],"title":"FileOut","description":"File resource returned by GET /files."},"ForgotPasswordIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"stripe_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Invoice Id"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"amount_due_cents":{"type":"integer","title":"Amount Due Cents"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","amount_due_cents","currency","status","created_at"],"title":"InvoiceOut","description":"Row of GET /billing/invoices."},"JobBatch":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/JobResource"},"type":"array","title":"Jobs"}},"type":"object","required":["jobs"],"title":"JobBatch","description":"Batch OCR submission response: ``{\"jobs\": [...]}``."},"JobLinks":{"properties":{"result":{"type":"string","title":"Result"},"download":{"type":"string","title":"Download"}},"type":"object","required":["result","download"],"title":"JobLinks","description":"Hypermedia links included on every job resource."},"JobResource":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"priority":{"type":"integer","title":"Priority"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"pages":{"type":"integer","title":"Pages"},"characters":{"type":"integer","title":"Characters"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"links":{"$ref":"#/components/schemas/JobLinks"}},"type":"object","required":["id","type","status","engine","priority","params","pages","characters","confidence","created_at","started_at","finished_at","duration_ms","error","result","links"],"title":"JobResource","description":"CONTRACTS.md §12 job JSON."},"LoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginIn"},"LogoutIn":{"properties":{"refresh_token":{"type":"string","maxLength":512,"minLength":16,"title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"LogoutIn"},"MessageOut":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageOut"},"ModelStatusOut":{"properties":{"name":{"type":"string","title":"Name"},"engine":{"type":"string","title":"Engine"},"path":{"type":"string","title":"Path"},"present":{"type":"boolean","title":"Present"},"files":{"type":"integer","title":"Files"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["name","engine","path","present","files","size_bytes"],"title":"ModelStatusOut","description":"Presence info for one expected model directory under MODELS_DIR."},"OrganizationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","owner_id","created_at"],"title":"OrganizationOut","description":"organizations row."},"Page_AdminJobOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminJobOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[AdminJobOut]"},"Page_AdminUserOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminUserOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[AdminUserOut]"},"Page_ApiKeyOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[ApiKeyOut]"},"Page_ApiRequestLogOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApiRequestLogOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[ApiRequestLogOut]"},"Page_AuditLogOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditLogOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[AuditLogOut]"},"Page_FileOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[FileOut]"},"Page_InvoiceOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[InvoiceOut]"},"Page_JobResource_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/JobResource"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[JobResource]"},"Page_ProjectOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProjectOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[ProjectOut]"},"Page_WebhookDeliveryOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDeliveryOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[WebhookDeliveryOut]"},"Page_WebhookEndpointOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookEndpointOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"Page[WebhookEndpointOut]"},"PasswordChangeIn":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChangeIn"},"PlanOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"price_usd_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Usd Month"},"ocr_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ocr Pages"},"tts_characters":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tts Characters"},"rate_limit_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Minute"},"storage_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Storage Bytes"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["id","name","features"],"title":"PlanOut","description":"One entry of GET /billing/plans (public catalog from PLANS)."},"ProjectCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"ProjectCreate","description":"Body for POST /projects."},"ProjectOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","created_at","updated_at"],"title":"ProjectOut","description":"Project resource returned by every projects endpoint."},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"}},"type":"object","title":"ProjectUpdate","description":"Body for PATCH /projects/{id}; omitted fields are left unchanged."},"QueueDepthOut":{"properties":{"name":{"type":"string","title":"Name"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","required":["name"],"title":"QueueDepthOut","description":"One Celery queue's backlog (None depth when Redis is unreachable)."},"RefreshIn":{"properties":{"refresh_token":{"type":"string","maxLength":512,"minLength":16,"title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshIn"},"RegisterIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"full_name":{"type":"string","maxLength":255,"title":"Full Name","default":""}},"type":"object","required":["email","password"],"title":"RegisterIn"},"ResendVerificationIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationIn"},"ResetPasswordIn":{"properties":{"token":{"type":"string","maxLength":512,"minLength":16,"title":"Token"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordIn"},"RevenueMonthOut":{"properties":{"month":{"type":"string","title":"Month"},"invoiced_cents":{"type":"integer","title":"Invoiced Cents"},"paid_cents":{"type":"integer","title":"Paid Cents"},"invoices":{"type":"integer","title":"Invoices"}},"type":"object","required":["month","invoiced_cents","paid_cents","invoices"],"title":"RevenueMonthOut","description":"One month bucket of invoice revenue."},"SubscriptionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","plan","status","created_at","updated_at"],"title":"SubscriptionOut","description":"subscriptions row mirror."},"TeamInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["admin","member"],"title":"Role","default":"member"}},"type":"object","required":["email"],"title":"TeamInviteRequest","description":"POST /team/invite body. Owners cannot be invited — ownership is implicit."},"TeamMemberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","status","created_at"],"title":"TeamMemberOut","description":"org_members row enriched with the member's user profile when linked."},"TeamMemberUpdate":{"properties":{"role":{"type":"string","enum":["admin","member"],"title":"Role"}},"type":"object","required":["role"],"title":"TeamMemberUpdate","description":"PATCH /team/members/{id} body."},"TeamOut":{"properties":{"organization":{"$ref":"#/components/schemas/OrganizationOut"},"members":{"items":{"$ref":"#/components/schemas/TeamMemberOut"},"type":"array","title":"Members"}},"type":"object","required":["organization","members"],"title":"TeamOut","description":"GET /team — the caller's organization and its members."},"TimeseriesPoint":{"properties":{"date":{"type":"string","title":"Date"},"value":{"type":"number","title":"Value"}},"type":"object","required":["date","value"],"title":"TimeseriesPoint","description":"One daily bucket of GET /usage/timeseries."},"TokenPairOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user":{"$ref":"#/components/schemas/UserOut"}},"type":"object","required":["access_token","refresh_token","expires_in","user"],"title":"TokenPairOut","description":"Successful auth response: JWT access + opaque refresh token + profile."},"TtsCreate":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":20000,"minLength":1},{"type":"null"}],"title":"Text"},"ssml":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Ssml"},"voice_id":{"type":"string","maxLength":128,"minLength":1,"title":"Voice Id"},"format":{"type":"string","enum":["mp3","wav","ogg"],"title":"Format","default":"mp3"},"speed":{"type":"number","maximum":2.0,"minimum":0.5,"title":"Speed","default":1.0},"pitch":{"type":"number","maximum":20.0,"minimum":-20.0,"title":"Pitch","default":0.0},"volume_gain_db":{"type":"number","maximum":20.0,"minimum":-20.0,"title":"Volume Gain Db","default":0.0},"priority":{"type":"integer","title":"Priority","default":0},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["voice_id"],"title":"TtsCreate","description":"Body for POST /tts — exactly one of ``text`` or ``ssml``."},"TtsDownloadRequest":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"format":{"anyOf":[{"type":"string","enum":["mp3","wav","ogg"]},{"type":"null"}],"title":"Format"}},"type":"object","required":["job_id"],"title":"TtsDownloadRequest","description":"Body for POST /download — fetch a finished TTS job's audio."},"TtsStreamRequest":{"properties":{"text":{"type":"string","maxLength":20000,"minLength":1,"title":"Text"},"voice_id":{"type":"string","maxLength":128,"minLength":1,"title":"Voice Id"}},"type":"object","required":["text","voice_id"],"title":"TtsStreamRequest","description":"Body for POST /stream (chunked audio/wav)."},"TwoFACodeIn":{"properties":{"code":{"type":"string","pattern":"^\\d{6,8}$","title":"Code"}},"type":"object","required":["code"],"title":"TwoFACodeIn"},"TwoFASetupOut":{"properties":{"secret":{"type":"string","title":"Secret"},"otpauth_url":{"type":"string","title":"Otpauth Url"}},"type":"object","required":["secret","otpauth_url"],"title":"TwoFASetupOut"},"TwoFAVerifyIn":{"properties":{"two_fa_token":{"type":"string","maxLength":2048,"minLength":16,"title":"Two Fa Token"},"code":{"type":"string","pattern":"^\\d{6,8}$","title":"Code"}},"type":"object","required":["two_fa_token","code"],"title":"TwoFAVerifyIn"},"UsageMetricSummary":{"properties":{"metric":{"type":"string","title":"Metric"},"used":{"type":"number","title":"Used"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Limit"},"percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent"}},"type":"object","required":["metric","used"],"title":"UsageMetricSummary","description":"One metric's month-to-date total against the plan quota."},"UsageSummaryOut":{"properties":{"plan":{"type":"string","title":"Plan"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"metrics":{"items":{"$ref":"#/components/schemas/UsageMetricSummary"},"type":"array","title":"Metrics"}},"type":"object","required":["plan","period_start","period_end","metrics"],"title":"UsageSummaryOut","description":"GET /usage/summary — current calendar month totals vs plan quotas."},"UserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"is_active":{"type":"boolean","title":"Is Active"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_superuser":{"type":"boolean","title":"Is Superuser"},"totp_enabled":{"type":"boolean","title":"Totp Enabled"},"plan":{"type":"string","title":"Plan"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","email","full_name","is_active","is_verified","is_superuser","totp_enabled","plan","created_at","updated_at"],"title":"UserOut"},"UserUpdateIn":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Full Name"}},"type":"object","title":"UserUpdateIn"},"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"},"VerifyEmailIn":{"properties":{"token":{"type":"string","maxLength":512,"minLength":16,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailIn"},"VoiceOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language"},"language_name":{"type":"string","title":"Language Name"},"gender":{"type":"string","title":"Gender"},"engine":{"type":"string","enum":["piper","xtts"],"title":"Engine"},"sample_rate":{"type":"integer","title":"Sample Rate"},"quality":{"type":"string","title":"Quality"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","name","language","language_name","gender","engine","sample_rate","quality"],"title":"VoiceOut","description":"One entry of the GET /voices catalog."},"VoicesOut":{"properties":{"voices":{"items":{"$ref":"#/components/schemas/VoiceOut"},"type":"array","title":"Voices"}},"type":"object","required":["voices"],"title":"VoicesOut","description":"GET /voices response: the full catalog document."},"WebhookDeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"event":{"type":"string","title":"Event"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","endpoint_id","event","payload","status","attempts","created_at"],"title":"WebhookDeliveryOut","description":"Row of GET /webhooks/{id}/deliveries."},"WebhookEndpointCreate":{"properties":{"url":{"type":"string","maxLength":1024,"minLength":1,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Events"}},"type":"object","required":["url","events"],"title":"WebhookEndpointCreate","description":"POST /webhooks body."},"WebhookEndpointCreatedOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","url","events","is_active","created_at","updated_at","secret"],"title":"WebhookEndpointCreatedOut","description":"POST /webhooks response — the only place the full secret is revealed."},"WebhookEndpointOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","url","events","is_active","created_at","updated_at"],"title":"WebhookEndpointOut","description":"Webhook endpoint resource (secret never included after creation)."},"WebhookEndpointUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Events"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookEndpointUpdate","description":"PATCH /webhooks/{id} body (all fields optional)."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"tags":[{"name":"health","description":"Liveness and readiness probes"},{"name":"auth","description":"Registration, login, tokens, 2FA"},{"name":"users","description":"Current-user profile"},{"name":"api-keys","description":"Programmatic API key management"},{"name":"projects","description":"Project CRUD"},{"name":"ocr","description":"OCR job submission"},{"name":"tts","description":"Text-to-speech jobs, voices, streaming"},{"name":"jobs","description":"Job listing, results, downloads"},{"name":"files","description":"Stored files"},{"name":"usage","description":"Usage summaries and timeseries"},{"name":"billing","description":"Plans, subscriptions, Stripe"},{"name":"webhooks","description":"Outgoing webhook endpoints"},{"name":"logs","description":"Request and audit logs"},{"name":"team","description":"Organization members and invites"},{"name":"admin","description":"Superuser operations"}]}