{"openapi":"3.1.0","info":{"title":"Inksong","description":"Where AI meets the human hand. Humanize AI-generated text while preserving formatting, voice, and intent.","version":"0.1.0"},"paths":{"/api/v1/auth/register":{"post":{"tags":["Auth"],"summary":"Register","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["Auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["Auth"],"summary":"Refresh","operationId":"refresh_api_v1_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["Auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["Auth"],"summary":"Get Me","operationId":"get_me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Auth"],"summary":"Delete Me","operationId":"delete_me_api_v1_auth_me_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Auth"],"summary":"Update Me","operationId":"update_me_api_v1_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/change-password":{"post":{"tags":["Auth"],"summary":"Change Password","operationId":"change_password_api_v1_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/onboarding-complete":{"post":{"tags":["Auth"],"summary":"Complete Onboarding","operationId":"complete_onboarding_api_v1_auth_onboarding_complete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/verify-email":{"post":{"tags":["Auth"],"summary":"Verify Email","operationId":"verify_email_api_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["Auth"],"summary":"Resend Verification","operationId":"resend_verification_api_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["Auth"],"summary":"Forgot Password","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["Auth"],"summary":"Reset Password","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout-all":{"post":{"tags":["Auth"],"summary":"Logout All","operationId":"logout_all_api_v1_auth_logout_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/rotate-api-key":{"post":{"tags":["Auth"],"summary":"Rotate Api Key","operationId":"rotate_api_key_api_v1_auth_rotate_api_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateApiKeyResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/documents/upload":{"post":{"tags":["Documents"],"summary":"Upload Document","operationId":"upload_document_api_v1_documents_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_v1_documents_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/documents/text":{"post":{"tags":["Documents"],"summary":"Humanize Paste Text","description":"Bearer-auth paste-text humanize. Mirrors /documents/upload for plain\ntext — creates a synthetic .txt Document and enqueues the job. Returns\nthe DocumentResponse with a job_id the client polls via GET /{job_id}.","operationId":"humanize_paste_text_api_v1_documents_text_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeTextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/documents/":{"get":{"tags":["Documents"],"summary":"List Documents","operationId":"list_documents_api_v1_documents__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"},"title":"Response List Documents Api V1 Documents  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/{job_id}":{"get":{"tags":["Documents"],"summary":"Get Document","operationId":"get_document_api_v1_documents__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Documents"],"summary":"Rename Document","description":"Set the user-facing ``display_name`` on a document.\n\n``original_filename`` stays as the ground truth for downloads (it\ncarries the file extension). This endpoint only updates the label\nused in the dashboard's recent-documents list and the detail page\nheading.","operationId":"rename_document_api_v1_documents__job_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameDocumentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/documents/preflight-score":{"post":{"tags":["Documents"],"summary":"Preflight Score","description":"Return an AI-likelihood score for a chunk of text *without*\nconsuming a credit.\n\nThe dashboard calls this just before submitting a humanize job. If\nthe score is low (≤ ~30%), the UI surfaces a confirmation: \"Your text\nalready reads as ~N% human. Continue anyway?\" — letting the user\nback out before a credit is burned on a near no-op transformation.\n\nThis is the structural fix for the \"I uploaded a real human-written\nletter and Inksong charged me a credit to produce a 3-point change\"\nfailure mode.","operationId":"preflight_score_api_v1_documents_preflight_score_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightScoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/documents/{job_id}/download":{"get":{"tags":["Documents"],"summary":"Download Document","operationId":"download_document_api_v1_documents__job_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/voice-profiles/":{"get":{"tags":["Voice Profiles"],"summary":"List Voice Profiles","operationId":"list_voice_profiles_api_v1_voice_profiles__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VoiceProfileResponse"},"type":"array","title":"Response List Voice Profiles Api V1 Voice Profiles  Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Voice Profiles"],"summary":"Create Voice Profile","operationId":"create_voice_profile_api_v1_voice_profiles__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/voice-profiles/analyze-dna":{"post":{"tags":["Voice Profiles"],"summary":"Analyze Writing Dna","operationId":"analyze_writing_dna_api_v1_voice_profiles_analyze_dna_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WritingDNAResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/voice-profiles/{profile_id}":{"delete":{"tags":["Voice Profiles"],"summary":"Delete Voice Profile","operationId":"delete_voice_profile_api_v1_voice_profiles__profile_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/humanize/text":{"post":{"tags":["Public API"],"summary":"Humanize Text Api","operationId":"humanize_text_api_api_v1_humanize_text_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeTextRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/humanize/detect-score":{"post":{"tags":["Public API"],"summary":"Detect Ai Score","operationId":"detect_ai_score_api_v1_humanize_detect_score_post","parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__public_api__DetectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/detect":{"post":{"tags":["Public Tools"],"summary":"Public Detect","operationId":"public_detect_api_v1_public_detect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__public_tools__DetectRequest"}}},"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/billing/currencies":{"get":{"tags":["Billing"],"summary":"List Currencies","operationId":"list_currencies_api_v1_billing_currencies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrenciesResponse"}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Checkout","operationId":"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/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/topup":{"post":{"tags":["Billing"],"summary":"Topup","operationId":"topup_api_v1_billing_topup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/verify":{"post":{"tags":["Billing"],"summary":"Verify","description":"Verify a transaction and apply state updates synchronously.\n\nCalled by the frontend right after the Paystack popup closes — eliminates\nthe dependency on the webhook for the immediate purchase event.\nIdempotent: re-verifying a successful reference is a no-op (state is\nalready correct from the first call). The webhook handler does the same\nwork; whichever fires first wins.","operationId":"verify_api_v1_billing_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/transactions":{"get":{"tags":["Billing"],"summary":"List Transactions","description":"Return the authenticated user's transaction history from Paystack.\n\nFree-tier users without ``paystack_customer_code`` get an empty list\nimmediately — no Paystack roundtrip.","operationId":"list_transactions_api_v1_billing_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/subscription":{"get":{"tags":["Billing"],"summary":"Get Subscription","description":"Return the user's subscription state, lazy-refreshing from Paystack\nif the cached renewal date is past — covers the no-webhook deployment\nwhere renewals/cancellations need a pull instead of a push.","operationId":"get_subscription_api_v1_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionState"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription","operationId":"cancel_subscription_api_v1_billing_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/events":{"get":{"tags":["Billing"],"summary":"List Billing Events","description":"Return the authenticated user's billing audit trail, newest first.\n\nCursor-paginated on ``id`` (monotonically increasing). The client\npasses the smallest ``id`` it has seen as ``before_id`` to get the\nnext page. ``limit`` is capped at 200 to keep response size bounded.\n\nUse cases:\n  - Dashboard \"billing history\" panel.\n  - Support / dispute resolution (the user can self-serve receipts\n    of what happened).\n  - Reconciliation scripts.","operationId":"list_billing_events_api_v1_billing_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhook":{"post":{"tags":["Billing"],"summary":"Paystack Webhook","operationId":"paystack_webhook_api_v1_billing_webhook_post","parameters":[{"name":"x-paystack-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Paystack-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces":{"get":{"tags":["Workspaces"],"summary":"List My Workspaces","operationId":"list_my_workspaces_api_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkspaceResponse"},"type":"array","title":"Response List My Workspaces Api V1 Workspaces Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Workspaces"],"summary":"Create Workspace","operationId":"create_workspace_api_v1_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workspaces/{slug}":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","operationId":"get_workspace_api_v1_workspaces__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Workspaces"],"summary":"Rename Workspace","operationId":"rename_workspace_api_v1_workspaces__slug__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameWorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete Workspace","operationId":"delete_workspace_api_v1_workspaces__slug__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{slug}/leave":{"post":{"tags":["Workspaces"],"summary":"Leave Workspace","operationId":"leave_workspace_api_v1_workspaces__slug__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{slug}/members/{user_id}":{"delete":{"tags":["Workspaces"],"summary":"Remove Member","operationId":"remove_member_api_v1_workspaces__slug__members__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Workspaces"],"summary":"Change Member Role","operationId":"change_member_role_api_v1_workspaces__slug__members__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMemberRoleRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{slug}/invites":{"post":{"tags":["Workspaces"],"summary":"Create Invite","operationId":"create_invite_api_v1_workspaces__slug__invites_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{slug}/invites/{invite_id}/revoke":{"post":{"tags":["Workspaces"],"summary":"Revoke Invite","operationId":"revoke_invite_api_v1_workspaces__slug__invites__invite_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"integer","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}":{"get":{"tags":["Invites"],"summary":"Lookup Invite","operationId":"lookup_invite_api_v1_invites__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}/accept":{"post":{"tags":["Invites"],"summary":"Accept Invite","operationId":"accept_invite_api_v1_invites__token__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_api_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookResponse"},"type":"array","title":"Response List Webhooks Api V1 Webhooks Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Webhooks"],"summary":"Create Webhook","operationId":"create_webhook_api_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/webhooks/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","operationId":"get_webhook_api_v1_webhooks__webhook_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update Webhook","operationId":"update_webhook_api_v1_webhooks__webhook_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_api_v1_webhooks__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Rotate Secret","operationId":"rotate_secret_api_v1_webhooks__webhook_id__rotate_secret_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateSecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List Deliveries","operationId":"list_deliveries_api_v1_webhooks__webhook_id__deliveries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/push-tokens":{"post":{"tags":["Push tokens"],"summary":"Register Push Token","operationId":"register_push_token_api_v1_push_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPushTokenRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/push-tokens/{token}":{"delete":{"tags":["Push tokens"],"summary":"Delete Push Token","operationId":"delete_push_token_api_v1_push_tokens__token__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/live":{"get":{"summary":"Health Live","operationId":"health_live_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"summary":"Health Ready","operationId":"health_ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics","description":"Prometheus scrape endpoint.\n\nGated by ``METRICS_TOKEN`` — pass ``?token=<value>`` or send the\n``Authorization: Bearer <value>`` header. If ``METRICS_TOKEN`` is\nnot configured, the endpoint is closed entirely (404) so a public\ndeploy doesn't accidentally expose internal counters.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BillingEventItem":{"properties":{"id":{"type":"integer","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"actor":{"type":"string","title":"Actor"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"plan_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Before"},"plan_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan After"},"credits_remaining_before":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Remaining Before"},"credits_remaining_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Remaining After"},"overage_credits_before":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overage Credits Before"},"overage_credits_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overage Credits After"},"paystack_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paystack Reference"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_type","actor","created_at"],"title":"BillingEventItem"},"BillingEventsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BillingEventItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"next_before_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Before Id"}},"type":"object","required":["items","has_more"],"title":"BillingEventsResponse"},"Body_upload_document_api_v1_documents_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"tone":{"type":"string","title":"Tone","default":"balanced"},"domain":{"type":"string","title":"Domain","default":""},"humanness_level":{"type":"integer","title":"Humanness Level","default":50},"voice_profile_id":{"type":"integer","title":"Voice Profile Id"}},"type":"object","required":["file"],"title":"Body_upload_document_api_v1_documents_upload_post"},"ChangeMemberRoleRequest":{"properties":{"role":{"type":"string","pattern":"^(owner|admin|member)$","title":"Role"}},"type":"object","required":["role"],"title":"ChangeMemberRoleRequest"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"currency":{"type":"string","title":"Currency"},"cadence":{"type":"string","title":"Cadence","default":"monthly"}},"type":"object","required":["plan","currency"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"access_code":{"type":"string","title":"Access Code"},"reference":{"type":"string","title":"Reference"},"public_key":{"type":"string","title":"Public Key"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["access_code","reference","public_key","amount","currency"],"title":"CheckoutResponse"},"CreateInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","pattern":"^(admin|member)$","title":"Role"}},"type":"object","required":["email","role"],"title":"CreateInviteRequest"},"CreateWebhookRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"}},"type":"object","required":["url"],"title":"CreateWebhookRequest"},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateWorkspaceRequest"},"CurrenciesResponse":{"properties":{"enabled":{"items":{"type":"string"},"type":"array","title":"Enabled"}},"type":"object","required":["enabled"],"title":"CurrenciesResponse","description":"Which currencies are accepting checkouts right now.\n\nA currency is \"enabled\" only if at least one plan in that currency\nhas a configured plan_code. NGN-only Paystack accounts (until USD is\napproved by support) will return ['NGN']."},"DeleteAccountRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"DeleteAccountRequest"},"DocumentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"original_filename":{"type":"string","title":"Original Filename"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"file_type":{"type":"string","title":"File Type"},"status":{"type":"string","title":"Status"},"progress":{"type":"integer","title":"Progress"},"tone":{"type":"string","title":"Tone"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"humanness_level":{"type":"integer","title":"Humanness Level"},"original_ai_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Ai Score"},"humanized_ai_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Humanized Ai Score"},"processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processing Time Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"}},"type":"object","required":["id","job_id","original_filename","file_type","status","progress","tone","domain","humanness_level","original_ai_score","humanized_ai_score","processing_time_ms","created_at","completed_at"],"title":"DocumentResponse"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HumanizeResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"progress":{"type":"integer","title":"Progress","default":0},"original_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Text"},"humanized_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Humanized Text"},"original_ai_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Ai Score"},"humanized_ai_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Humanized Ai Score"},"detection_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detection Details"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status"],"title":"HumanizeResponse"},"HumanizeTextRequest":{"properties":{"text":{"type":"string","maxLength":500000,"minLength":10,"title":"Text"},"tone":{"type":"string","title":"Tone","default":"balanced"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"humanness_level":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Humanness Level","default":50},"voice_profile_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Profile Id"}},"type":"object","required":["text"],"title":"HumanizeTextRequest"},"InviteLookupResponse":{"properties":{"email":{"type":"string","title":"Email"},"workspace_name":{"type":"string","title":"Workspace Name"},"role":{"type":"string","title":"Role"},"inviter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Name"},"inviter_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Email"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["email","workspace_name","role","expires_at"],"title":"InviteLookupResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"PreflightScoreRequest":{"properties":{"text":{"type":"string","maxLength":200000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"PreflightScoreRequest"},"PreflightScoreResponse":{"properties":{"ai_score":{"type":"number","title":"Ai Score"},"human_score":{"type":"number","title":"Human Score"},"word_count":{"type":"integer","title":"Word Count"},"recommend_humanize":{"type":"boolean","title":"Recommend Humanize"}},"type":"object","required":["ai_score","human_score","word_count","recommend_humanize"],"title":"PreflightScoreResponse"},"PushTokenResponse":{"properties":{"id":{"type":"integer","title":"Id"},"token":{"type":"string","title":"Token"},"platform":{"type":"string","title":"Platform"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","token","platform","created_at"],"title":"PushTokenResponse"},"RegisterPushTokenRequest":{"properties":{"token":{"type":"string","maxLength":255,"minLength":10,"title":"Token"},"platform":{"type":"string","pattern":"^(ios|android|web)$","title":"Platform"},"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"}},"type":"object","required":["token","platform"],"title":"RegisterPushTokenRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RenameDocumentRequest":{"properties":{"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"}},"type":"object","required":["display_name"],"title":"RenameDocumentRequest"},"RenameWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"RenameWorkspaceRequest"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest"},"RotateApiKeyResponse":{"properties":{"api_key":{"type":"string","title":"Api Key"},"rotated_at":{"type":"string","format":"date-time","title":"Rotated At"}},"type":"object","required":["api_key","rotated_at"],"title":"RotateApiKeyResponse"},"RotateSecretResponse":{"properties":{"signing_secret":{"type":"string","title":"Signing Secret"},"rotated_at":{"type":"string","format":"date-time","title":"Rotated At"}},"type":"object","required":["signing_secret","rotated_at"],"title":"RotateSecretResponse"},"StatusResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"StatusResponse"},"SubscriptionState":{"properties":{"plan":{"type":"string","title":"Plan"},"plan_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Renews At"},"paystack_subscription_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paystack Subscription Code"},"paystack_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paystack Currency"}},"type":"object","required":["plan"],"title":"SubscriptionState"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"null"}]}},"type":"object","required":["access_token"],"title":"TokenResponse"},"TopupRequest":{"properties":{"currency":{"type":"string","title":"Currency"},"packs":{"type":"integer","title":"Packs","default":1}},"type":"object","required":["currency"],"title":"TopupRequest"},"TopupResponse":{"properties":{"access_code":{"type":"string","title":"Access Code"},"reference":{"type":"string","title":"Reference"},"public_key":{"type":"string","title":"Public Key"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"credits":{"type":"integer","title":"Credits"}},"type":"object","required":["access_code","reference","public_key","amount","currency","credits"],"title":"TopupResponse"},"Transaction":{"properties":{"reference":{"type":"string","title":"Reference"},"description":{"type":"string","title":"Description"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["reference","description","amount","currency","status"],"title":"Transaction"},"TransactionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Transaction"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"TransactionsResponse"},"UpdateProfileRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"}},"type":"object","title":"UpdateProfileRequest"},"UpdateWebhookRequest":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateWebhookRequest"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"plan":{"type":"string","title":"Plan"},"credits_remaining":{"type":"integer","title":"Credits Remaining"},"overage_credits":{"type":"integer","title":"Overage Credits","default":0},"api_key":{"type":"string","title":"Api Key"},"has_onboarded":{"type":"boolean","title":"Has Onboarded","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"email_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Verified At"},"plan_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Renews At"}},"type":"object","required":["id","email","name","plan","credits_remaining","api_key","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"VerifyRequest":{"properties":{"reference":{"type":"string","title":"Reference"}},"type":"object","required":["reference"],"title":"VerifyRequest"},"VerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"status":{"type":"string","title":"Status"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"credits_added":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Added"}},"type":"object","required":["verified","status"],"title":"VerifyResponse"},"VoiceProfileCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sample_texts":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Sample Texts"}},"type":"object","required":["name","sample_texts"],"title":"VoiceProfileCreateRequest"},"VoiceProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"avg_sentence_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Sentence Length"},"vocabulary_richness":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vocabulary Richness"},"formality_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Formality Score"},"warmth_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Warmth Score"},"complexity_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Complexity Score"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sample_count":{"type":"integer","title":"Sample Count","default":0}},"type":"object","required":["id","name","description","avg_sentence_length","vocabulary_richness","formality_score","warmth_score","complexity_score","created_at"],"title":"VoiceProfileResponse"},"WebhookDeliveriesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDeliveryResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"WebhookDeliveriesResponse"},"WebhookDeliveryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"response_body_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body Excerpt"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_type","status","attempts","created_at"],"title":"WebhookDeliveryResponse"},"WebhookResponse":{"properties":{"id":{"type":"integer","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"signing_secret_masked":{"type":"string","title":"Signing Secret Masked"},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","is_active","signing_secret_masked","created_at"],"title":"WebhookResponse"},"WebhookWithSecretResponse":{"properties":{"id":{"type":"integer","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"signing_secret_masked":{"type":"string","title":"Signing Secret Masked"},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivery At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"signing_secret":{"type":"string","title":"Signing Secret"}},"type":"object","required":["id","url","is_active","signing_secret_masked","created_at","signing_secret"],"title":"WebhookWithSecretResponse"},"WorkspaceDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"member_count":{"type":"integer","title":"Member Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"members":{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array","title":"Members"},"pending_invites":{"items":{"$ref":"#/components/schemas/WorkspaceInviteResponse"},"type":"array","title":"Pending Invites"}},"type":"object","required":["id","slug","name","role","member_count","created_at","members","pending_invites"],"title":"WorkspaceDetailResponse"},"WorkspaceInviteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","expires_at","created_at"],"title":"WorkspaceInviteResponse"},"WorkspaceMemberResponse":{"properties":{"user_id":{"type":"integer","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["user_id","email","role","joined_at"],"title":"WorkspaceMemberResponse"},"WorkspaceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"member_count":{"type":"integer","title":"Member Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","slug","name","role","member_count","created_at"],"title":"WorkspaceResponse"},"WritingDNAResponse":{"properties":{"avg_sentence_length":{"type":"number","title":"Avg Sentence Length"},"sentence_length_variance":{"type":"number","title":"Sentence Length Variance"},"vocabulary_richness":{"type":"number","title":"Vocabulary Richness"},"readability_grade":{"type":"number","title":"Readability Grade"},"formality_score":{"type":"integer","title":"Formality Score"},"warmth_score":{"type":"integer","title":"Warmth Score"},"complexity_score":{"type":"integer","title":"Complexity Score"},"tone_profile":{"type":"string","title":"Tone Profile"},"top_transition_words":{"items":{"type":"string"},"type":"array","title":"Top Transition Words"},"avg_paragraph_length":{"type":"number","title":"Avg Paragraph Length"},"question_frequency":{"type":"number","title":"Question Frequency"},"exclamation_frequency":{"type":"number","title":"Exclamation Frequency"}},"type":"object","required":["avg_sentence_length","sentence_length_variance","vocabulary_richness","readability_grade","formality_score","warmth_score","complexity_score","tone_profile","top_transition_words","avg_paragraph_length","question_frequency","exclamation_frequency"],"title":"WritingDNAResponse"},"app__api__public_api__DetectRequest":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"DetectRequest"},"app__api__public_tools__DetectRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"DetectRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}