{"openapi":"3.1.0","info":{"title":"lightpaper.org","description":"API-first publishing platform. One HTTP call, one permanent URL.","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"summary":"Health Ready","description":"Readiness check — verifies database connectivity.","operationId":"health_ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/publish":{"post":{"tags":["publish"],"summary":"Publish Document","operationId":"publish_document_v1_publish_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__PublishRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/documents/{doc_id}":{"get":{"tags":["documents"],"summary":"Get Document","operationId":"get_document_v1_documents__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"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"}}}}}},"put":{"tags":["documents"],"summary":"Update Document","operationId":"update_document_v1_documents__doc_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdateRequest"}}}},"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"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Document","operationId":"delete_document_v1_documents__doc_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{doc_id}/versions":{"get":{"tags":["documents"],"summary":"List Versions","operationId":"list_versions_v1_documents__doc_id__versions_get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VersionResponse"},"title":"Response List Versions V1 Documents  Doc Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"tags":["search"],"summary":"Search Documents","operationId":"search_documents_v1_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full-text search query","title":"Q"},"description":"Full-text search query"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated tag filter","title":"Tags"},"description":"Comma-separated tag filter"},{"name":"author","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by author handle","title":"Author"},"description":"Filter by author handle"},{"name":"min_quality","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":0,"description":"Minimum quality score","default":40,"title":"Min Quality"},"description":"Minimum quality score"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"Sort: relevance, recent, quality","default":"relevance","title":"Sort"},"description":"Sort: relevance, recent, quality"},{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"Type: document, book, all","default":"all","title":"Type"},"description":"Type: document, book, all"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books":{"post":{"tags":["books"],"summary":"Publish Book","description":"Publish a complete book with all chapters at once.","operationId":"publish_book_v1_books_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishBookRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishBookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/books/{book_id}":{"get":{"tags":["books"],"summary":"Get Book","description":"Get book metadata and chapter listing.","operationId":"get_book_v1_books__book_id__get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["books"],"summary":"Update Book","description":"Update book metadata.","operationId":"update_book_v1_books__book_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["books"],"summary":"Delete Book","description":"Soft-delete a book and all its chapters.","operationId":"delete_book_v1_books__book_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/chapters":{"post":{"tags":["books"],"summary":"Add Chapter","description":"Add a chapter to an existing book.","operationId":"add_chapter_v1_books__book_id__chapters_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddChapterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChapterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/chapters/reorder":{"put":{"tags":["books"],"summary":"Reorder Chapters","description":"Reorder chapters by providing document IDs in desired order.","operationId":"reorder_chapters_v1_books__book_id__chapters_reorder_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderChaptersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChapterResponse"},"title":"Response Reorder Chapters V1 Books  Book Id  Chapters Reorder Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/chapters/{doc_id}":{"delete":{"tags":["books"],"summary":"Detach Chapter","description":"Detach a chapter from a book (document survives as standalone).","operationId":"detach_chapter_v1_books__book_id__chapters__doc_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account":{"get":{"tags":["accounts"],"summary":"Get Account","operationId":"get_account_v1_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["accounts"],"summary":"Create Account","operationId":"create_account_v1_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["accounts"],"summary":"Delete Account","description":"GDPR hard-delete: cascades to all documents, versions, keys.","operationId":"delete_account_v1_account_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["accounts"],"summary":"Update Account","operationId":"update_account_v1_account_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/documents":{"get":{"tags":["accounts"],"summary":"List Account Documents","operationId":"list_account_documents_v1_account_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/keys":{"get":{"tags":["keys"],"summary":"List Keys","operationId":"list_keys_v1_account_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KeyResponse"},"type":"array","title":"Response List Keys V1 Account Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["keys"],"summary":"Create Key","operationId":"create_key_v1_account_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/keys/{prefix}":{"delete":{"tags":["keys"],"summary":"Revoke Key","operationId":"revoke_key_v1_account_keys__prefix__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prefix","in":"path","required":true,"schema":{"type":"string","title":"Prefix"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/verify/domain":{"post":{"tags":["verification"],"summary":"Start Domain Verification","operationId":"start_domain_verification_v1_account_verify_domain_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/verify/domain/check":{"get":{"tags":["verification"],"summary":"Check Domain Verification","operationId":"check_domain_verification_v1_account_verify_domain_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/verify/orcid":{"post":{"tags":["verification"],"summary":"Verify Orcid","description":"Verify ORCID iD via the public ORCID API. Fully agent-automatable.","operationId":"verify_orcid_v1_account_verify_orcid_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrcidVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrcidVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/gravity":{"get":{"tags":["verification"],"summary":"Get Gravity","operationId":"get_gravity_v1_account_gravity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GravityResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/email":{"post":{"tags":["auth"],"summary":"Auth Email","description":"Send a 6-digit OTP code to the given email. Works for both signup and login.","operationId":"auth_email_v1_auth_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Auth Verify","description":"Verify an OTP code. Returns account + API key (creates account if new).","operationId":"auth_verify_v1_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/linkedin":{"post":{"tags":["auth"],"summary":"Auth Linkedin","description":"Start LinkedIn OAuth for login/signup. Returns an authorization URL.","operationId":"auth_linkedin_v1_auth_linkedin_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInAuthStartResponse"}}}}}}},"/v1/auth/linkedin/callback":{"get":{"tags":["auth"],"summary":"Auth Linkedin Callback","description":"LinkedIn OAuth callback. Matches or creates an account, stores API key for poll pickup.","operationId":"auth_linkedin_callback_v1_auth_linkedin_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/linkedin/poll":{"get":{"tags":["auth"],"summary":"Auth Linkedin Poll","description":"Poll for LinkedIn OAuth completion. Returns API key on first read, then nulls it.","operationId":"auth_linkedin_poll_v1_auth_linkedin_poll_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInAuthPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/verify/linkedin":{"post":{"tags":["verification"],"summary":"Start Linkedin Verification","description":"Start LinkedIn OAuth flow. Returns an authorization URL for the pilot to open.","operationId":"start_linkedin_verification_v1_account_verify_linkedin_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInVerifyResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/verify/linkedin/callback":{"get":{"tags":["verification"],"summary":"Linkedin Callback","description":"LinkedIn OAuth callback. Exchanges code for token and verifies identity.","operationId":"linkedin_callback_v1_account_verify_linkedin_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/verify/linkedin/check":{"get":{"tags":["verification"],"summary":"Check Linkedin Verification","description":"Poll endpoint for agents to check if LinkedIn OAuth was completed.","operationId":"check_linkedin_verification_v1_account_verify_linkedin_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInCheckResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/account/credentials":{"get":{"tags":["credentials"],"summary":"List Credentials","description":"List all credentials for the authenticated account.","operationId":"list_credentials_v1_account_credentials_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CredentialResponse"},"type":"array","title":"Response List Credentials V1 Account Credentials Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["credentials"],"summary":"Submit Credentials","description":"Batch upsert credentials. Only upgrades evidence tiers, never downgrades.","operationId":"submit_credentials_v1_account_credentials_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/status":{"get":{"tags":["billing"],"summary":"Billing Status","description":"Get billing status: tier, usage, limits.","operationId":"billing_status_v1_billing_status_get","parameters":[{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create a Stripe Checkout session for upgrading to Pro.","operationId":"create_checkout_v1_billing_checkout_post","parameters":[{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","description":"Create a Stripe Billing Portal session for managing subscription.","operationId":"create_portal_v1_billing_portal_post","parameters":[{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.","operationId":"stripe_webhook_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/narration/voices":{"get":{"tags":["narration"],"summary":"List Voices","description":"List available narration voices.","operationId":"list_voices_v1_narration_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/narration/estimate":{"post":{"tags":["narration"],"summary":"Narration Estimate","description":"Estimate narration cost for a book.","operationId":"narration_estimate_v1_narration_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NarrationEstimateRequest"}}},"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":[]}]}},"/v1/narration/create":{"post":{"tags":["narration"],"summary":"Create Narration","description":"Create a narration and return a Stripe checkout URL for payment.","operationId":"create_narration_v1_narration_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NarrationCreateRequest"}}},"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":[]}]}},"/v1/narration/{narration_id}":{"get":{"tags":["narration"],"summary":"Get Narration Status","description":"Get narration status and chapter audio URLs.","operationId":"get_narration_status_v1_narration__narration_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"narration_id","in":"path","required":true,"schema":{"type":"string","title":"Narration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/narration/start/{narration_id}":{"post":{"tags":["narration"],"summary":"Start Narration Manual","description":"Manually start a narration (skip Stripe payment). Owner testing only.","operationId":"start_narration_manual_v1_narration_start__narration_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"narration_id","in":"path","required":true,"schema":{"type":"string","title":"Narration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/narration/callback/{callback_token}":{"post":{"tags":["narration"],"summary":"Narration Callback","description":"ElevenLabs completion callback — no auth, token IS the auth.","operationId":"narration_callback_v1_narration_callback__callback_token__post","parameters":[{"name":"callback_token","in":"path","required":true,"schema":{"type":"string","title":"Callback Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/print/preview":{"post":{"tags":["print"],"summary":"Print Preview","description":"Generate a 10-page preview PDF of the interior.","operationId":"print_preview_v1_books__book_id__print_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/print/interior":{"post":{"tags":["print"],"summary":"Print Interior","description":"Generate full print-ready interior PDF (6\"x9\" trade paperback). Pro required.","operationId":"print_interior_v1_books__book_id__print_interior_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/print/cover":{"post":{"tags":["print"],"summary":"Print Cover","description":"Generate print-ready cover PDF (300 DPI with bleed). Pro required.\n\nPass `page_count` query param to set spine width (default 200).","operationId":"print_cover_v1_books__book_id__print_cover_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}},{"name":"page_count","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Page Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/books/{book_id}/print/certificate":{"get":{"tags":["print"],"summary":"Print Certificate","description":"Generate Certificate of Publication PDF. Free for all users.","operationId":"print_certificate_v1_books__book_id__print_certificate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/robots.txt":{"get":{"tags":["discovery"],"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/feed.xml":{"get":{"tags":["discovery"],"summary":"Atom Feed","description":"Atom feed of recent published documents and books.","operationId":"atom_feed_feed_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/feed.json":{"get":{"tags":["discovery"],"summary":"Json Feed","description":"JSON Feed 1.1 of recent published documents.","operationId":"json_feed_feed_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/ai-plugin.json":{"get":{"tags":["discovery"],"summary":"Ai Plugin Json","description":"OpenAI-style agent discovery manifest.","operationId":"ai_plugin_json__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agent.json":{"get":{"tags":["discovery"],"summary":"A2A Agent Json","description":"Google A2A protocol agent card.","operationId":"a2a_agent_json__well_known_agent_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/mcp-registry-auth":{"get":{"tags":["discovery"],"summary":"Mcp Registry Auth","description":"Public key for MCP Registry HTTP authentication.","operationId":"mcp_registry_auth__well_known_mcp_registry_auth_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/mcp/server-card.json":{"get":{"tags":["discovery"],"summary":"Mcp Server Card","description":"MCP server card for Smithery and other MCP registries.","operationId":"mcp_server_card__well_known_mcp_server_card_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["discovery"],"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["discovery"],"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/indexing-report":{"get":{"tags":["discovery"],"summary":"Indexing Report","description":"Check Google indexing status for all listed documents.\n\nRefreshes stale checks (>24h) via the URL Inspection API, then returns\na full report of indexed vs. not-indexed documents.","operationId":"indexing_report_v1_admin_indexing_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/og/{doc_id}.png":{"get":{"tags":["discovery"],"summary":"Og Image","operationId":"og_image_og__doc_id__png_get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/og/book_{book_id}.png":{"get":{"tags":["discovery"],"summary":"Book Og Image","operationId":"book_og_image_og_book__book_id__png_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"Book Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["landing"],"summary":"Landing Page","operationId":"landing_page__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"tags":["landing"],"summary":"Privacy Page","operationId":"privacy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"tags":["landing"],"summary":"Terms Page","operationId":"terms_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/write/auth/login":{"post":{"tags":["write"],"summary":"Ide Login","description":"Exchange an API key for an IDE session cookie.","operationId":"ide_login_v1_write_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/auth/email":{"post":{"tags":["write"],"summary":"Ide Email Login","description":"Send a 6-digit OTP code to the given email for IDE login.","operationId":"ide_email_login_v1_write_auth_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/auth/verify":{"post":{"tags":["write"],"summary":"Ide Email Verify","description":"Verify OTP code and set IDE session cookie. Creates account if new.","operationId":"ide_email_verify_v1_write_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/auth/logout":{"post":{"tags":["write"],"summary":"Ide Logout","description":"Clear the IDE session cookie.","operationId":"ide_logout_v1_write_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/write/auth/me":{"get":{"tags":["write"],"summary":"Ide Me","description":"Get current authenticated user.","operationId":"ide_me_v1_write_auth_me_get","parameters":[{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions":{"post":{"tags":["write"],"summary":"Create Session","description":"Create a new writing session.","operationId":"create_session_v1_write_sessions_post","parameters":[{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["write"],"summary":"List Sessions","description":"List all writing sessions for the authenticated user.","operationId":"list_sessions_v1_write_sessions_get","parameters":[{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}":{"get":{"tags":["write"],"summary":"Get Session","description":"Get a writing session with its file tree.","operationId":"get_session_v1_write_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["write"],"summary":"Delete Session","description":"Soft-delete a writing session.","operationId":"delete_session_v1_write_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}/files":{"get":{"tags":["write"],"summary":"List Files","description":"Get all files for a session, grouped by wave.","operationId":"list_files_v1_write_sessions__session_id__files_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}/files/{file_id}":{"get":{"tags":["write"],"summary":"Get File","description":"Get a single file's content.","operationId":"get_file_v1_write_sessions__session_id__files__file_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["write"],"summary":"Update File","description":"Update a file's content (author edits).","operationId":"update_file_v1_write_sessions__session_id__files__file_id__put","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}/messages":{"get":{"tags":["write"],"summary":"List Messages","description":"Get chat messages for a session, optionally filtered by wave.","operationId":"list_messages_v1_write_sessions__session_id__messages_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"wave","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wave"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}/chat":{"post":{"tags":["write"],"summary":"Chat","description":"Send a message and get a streaming response from Claude with file creation via tool_use.","operationId":"chat_v1_write_sessions__session_id__chat_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}/advance":{"post":{"tags":["write"],"summary":"Advance Wave","description":"Advance to the next wave.","operationId":"advance_wave_v1_write_sessions__session_id__advance_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/write/sessions/{session_id}/publish":{"post":{"tags":["write"],"summary":"Publish Session","description":"Publish a writing session as a document or book on lightpaper.org.","operationId":"publish_session_v1_write_sessions__session_id__publish_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"lp_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lp Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__write__PublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/write":{"get":{"tags":["ide"],"summary":"Ide Spa","description":"Serve the React SPA. All /write/* routes return index.html for client-side routing.","operationId":"ide_spa_write_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/write/{path}":{"get":{"tags":["ide"],"summary":"Ide Spa","description":"Serve the React SPA. All /write/* routes return index.html for client-side routing.","operationId":"ide_spa_write__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/@{handle}":{"get":{"tags":["author"],"summary":"Author Profile","operationId":"author_profile___handle__get","parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string","title":"Handle"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/d/{doc_id}":{"get":{"tags":["reading"],"summary":"Read By Id","operationId":"read_by_id_d__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/books/{slug}":{"get":{"tags":["reading"],"summary":"Read Book Redirect","description":"Redirect /books/{slug} to /{slug} for backward compatibility.","operationId":"read_book_redirect_books__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{slug}":{"get":{"tags":["reading"],"summary":"Read By Slug","operationId":"read_by_slug__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountCreateRequest":{"properties":{"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"AccountCreateRequest"},"AccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"tier":{"type":"string","title":"Tier"},"gravity_level":{"type":"integer","title":"Gravity Level"},"gravity_badges":{"items":{"type":"string"},"type":"array","title":"Gravity Badges"},"verified_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verified Domain"},"verified_linkedin":{"type":"boolean","title":"Verified Linkedin"},"orcid_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orcid Id"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","handle","display_name","email","bio","tier","gravity_level","gravity_badges","verified_domain","verified_linkedin","orcid_id","created_at"],"title":"AccountResponse"},"AccountUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"bio":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Bio"},"linkedin_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Linkedin Url"}},"type":"object","title":"AccountUpdateRequest"},"AddChapterRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subtitle"},"content":{"type":"string","maxLength":500000,"minLength":1,"title":"Content"},"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"},"position":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Position","description":"Insert at this position (appends if omitted)"}},"type":"object","required":["title","content"],"title":"AddChapterRequest"},"AuthEmailRequest":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"handle":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Handle"}},"type":"object","required":["email"],"title":"AuthEmailRequest"},"AuthEmailResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"message":{"type":"string","title":"Message"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["session_id","message","expires_in"],"title":"AuthEmailResponse"},"AuthVerifyRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code"}},"type":"object","required":["session_id","code"],"title":"AuthVerifyRequest"},"AuthVerifyResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"api_key":{"type":"string","title":"Api Key"},"is_new_account":{"type":"boolean","title":"Is New Account"},"gravity_level":{"type":"integer","title":"Gravity Level"},"next_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Level"}},"type":"object","required":["account_id","handle","api_key","is_new_account","gravity_level","next_level"],"title":"AuthVerifyResponse"},"AuthorInfo":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"handle":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Handle"}},"type":"object","required":["name"],"title":"AuthorInfo"},"BookResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"format":{"type":"string","title":"Format"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"authors":{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","title":"Authors"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"quality_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Score"},"author_gravity":{"type":"integer","title":"Author Gravity"},"chapter_count":{"type":"integer","title":"Chapter Count"},"total_word_count":{"type":"integer","title":"Total Word Count"},"listed":{"type":"boolean","title":"Listed"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"chapters":{"items":{"$ref":"#/components/schemas/ChapterResponse"},"type":"array","title":"Chapters"},"license":{"type":"string","title":"License","default":"all-rights-reserved"}},"type":"object","required":["id","title","subtitle","description","format","slug","authors","tags","cover_image_url","quality_score","author_gravity","chapter_count","total_word_count","listed","created_at","updated_at","url","chapters"],"title":"BookResponse"},"BookUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subtitle"},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Description"},"format":{"anyOf":[{"type":"string","enum":["paper","essay","post"]},{"type":"null"}],"title":"Format"},"authors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","maxItems":20},{"type":"null"}],"title":"Authors"},"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Tags"},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Metadata"},"listed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Listed"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"license":{"anyOf":[{"type":"string","enum":["all-rights-reserved","cc-by-4.0","cc-by-sa-4.0","cc-by-nc-4.0","cc-by-nc-sa-4.0","cc0"]},{"type":"null"}],"title":"License"}},"type":"object","title":"BookUpdateRequest"},"ChapterInput":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subtitle"},"content":{"type":"string","maxLength":500000,"minLength":1,"title":"Content"},"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"}},"type":"object","required":["title","content"],"title":"ChapterInput"},"ChapterResponse":{"properties":{"chapter_number":{"type":"integer","title":"Chapter Number"},"document_id":{"type":"string","title":"Document Id"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"permanent_url":{"type":"string","title":"Permanent Url"},"word_count":{"type":"integer","title":"Word Count"},"reading_time_minutes":{"type":"integer","title":"Reading Time Minutes"},"quality_score":{"type":"integer","title":"Quality Score"}},"type":"object","required":["chapter_number","document_id","title","url","permanent_url","word_count","reading_time_minutes","quality_score"],"title":"ChapterResponse"},"ChatRequest":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ChatRequest"},"CheckoutRequest":{"properties":{"success_url":{"type":"string","title":"Success Url","default":"/write?billing=success"},"cancel_url":{"type":"string","title":"Cancel Url","default":"/write?billing=cancelled"}},"type":"object","title":"CheckoutRequest"},"CreateSessionRequest":{"properties":{"title":{"type":"string","title":"Title"},"book_config":{"type":"object","title":"Book Config","default":{}}},"type":"object","required":["title"],"title":"CreateSessionRequest"},"CredentialResponse":{"properties":{"id":{"type":"string","title":"Id"},"credential_type":{"type":"string","title":"Credential Type"},"institution":{"type":"string","title":"Institution"},"title":{"type":"string","title":"Title"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"evidence_tier":{"type":"string","title":"Evidence Tier"},"agent_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","credential_type","institution","title","year","evidence_tier","agent_notes","created_at","updated_at"],"title":"CredentialResponse"},"CredentialSubmission":{"properties":{"credential_type":{"type":"string","enum":["degree","certification","employment"],"title":"Credential Type"},"institution":{"type":"string","maxLength":500,"minLength":1,"title":"Institution"},"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"year":{"anyOf":[{"type":"integer","maximum":2100.0,"minimum":1900.0},{"type":"null"}],"title":"Year"},"evidence_tier":{"type":"string","enum":["confirmed","supported","claimed"],"title":"Evidence Tier"},"evidence_data":{"type":"object","title":"Evidence Data"},"agent_notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Agent Notes"}},"type":"object","required":["credential_type","institution","title","evidence_tier"],"title":"CredentialSubmission"},"CredentialSubmitRequest":{"properties":{"credentials":{"items":{"$ref":"#/components/schemas/CredentialSubmission"},"type":"array","maxItems":20,"minItems":1,"title":"Credentials"}},"type":"object","required":["credentials"],"title":"CredentialSubmitRequest"},"CredentialSubmitResponse":{"properties":{"credentials":{"items":{"$ref":"#/components/schemas/CredentialResponse"},"type":"array","title":"Credentials"},"gravity_level":{"type":"integer","title":"Gravity Level"},"gravity_badges":{"items":{"type":"string"},"type":"array","title":"Gravity Badges"},"credential_points":{"type":"integer","title":"Credential Points"}},"type":"object","required":["credentials","gravity_level","gravity_badges","credential_points"],"title":"CredentialSubmitResponse"},"DocumentResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"content":{"type":"string","title":"Content"},"format":{"type":"string","title":"Format"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"authors":{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","title":"Authors"},"metadata":{"type":"object","title":"Metadata"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"},"reading_time_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reading Time Minutes"},"quality_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Score"},"author_gravity":{"type":"integer","title":"Author Gravity"},"current_version":{"type":"integer","title":"Current Version"},"listed":{"type":"boolean","title":"Listed"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"permanent_url":{"type":"string","title":"Permanent Url"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"license":{"type":"string","title":"License","default":"all-rights-reserved"}},"type":"object","required":["id","title","subtitle","content","format","slug","authors","metadata","tags","word_count","reading_time_minutes","quality_score","author_gravity","current_version","listed","created_at","updated_at","permanent_url","url"],"title":"DocumentResponse"},"DocumentUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subtitle"},"content":{"anyOf":[{"type":"string","maxLength":500000},{"type":"null"}],"title":"Content"},"format":{"anyOf":[{"type":"string","enum":["paper","essay","post","markdown","academic","report","tutorial"]},{"type":"null"}],"title":"Format"},"authors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","maxItems":20},{"type":"null"}],"title":"Authors"},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Metadata"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Tags"},"listed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Listed"},"license":{"anyOf":[{"type":"string","enum":["all-rights-reserved","cc-by-4.0","cc-by-sa-4.0","cc-by-nc-4.0","cc-by-nc-sa-4.0","cc0"]},{"type":"null"}],"title":"License"}},"type":"object","title":"DocumentUpdateRequest"},"DomainVerifyRequest":{"properties":{"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"DomainVerifyRequest"},"DomainVerifyResponse":{"properties":{"domain":{"type":"string","title":"Domain"},"txt_record":{"type":"string","title":"Txt Record"},"instructions":{"type":"string","title":"Instructions"}},"type":"object","required":["domain","txt_record","instructions"],"title":"DomainVerifyResponse"},"EmailLoginRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"EmailLoginRequest"},"EmailVerifyRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"code":{"type":"string","title":"Code"}},"type":"object","required":["session_id","code"],"title":"EmailVerifyRequest"},"GravityResponse":{"properties":{"level":{"type":"integer","title":"Level"},"badges":{"items":{"type":"string"},"type":"array","title":"Badges"},"next_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Level"},"multiplier":{"type":"number","title":"Multiplier"},"featured_threshold":{"type":"integer","title":"Featured Threshold"}},"type":"object","required":["level","badges","next_level","multiplier","featured_threshold"],"title":"GravityResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyCreateRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"tier":{"type":"string","title":"Tier","default":"free"}},"type":"object","title":"KeyCreateRequest"},"KeyCreateResponse":{"properties":{"key":{"type":"string","title":"Key"},"prefix":{"type":"string","title":"Prefix"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"tier":{"type":"string","title":"Tier"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["key","prefix","label","tier","created_at"],"title":"KeyCreateResponse"},"KeyResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"tier":{"type":"string","title":"Tier"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["prefix","label","tier","created_at"],"title":"KeyResponse"},"LinkedInAuthPollResponse":{"properties":{"completed":{"type":"boolean","title":"Completed"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"gravity_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gravity Level"}},"type":"object","required":["completed"],"title":"LinkedInAuthPollResponse"},"LinkedInAuthStartResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"},"session_id":{"type":"string","title":"Session Id"},"instructions":{"type":"string","title":"Instructions"}},"type":"object","required":["authorization_url","session_id","instructions"],"title":"LinkedInAuthStartResponse"},"LinkedInCheckResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"gravity_level":{"type":"integer","title":"Gravity Level"}},"type":"object","required":["verified","gravity_level"],"title":"LinkedInCheckResponse"},"LinkedInVerifyResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"},"state":{"type":"string","title":"State"},"instructions":{"type":"string","title":"Instructions"}},"type":"object","required":["authorization_url","state","instructions"],"title":"LinkedInVerifyResponse"},"LoginRequest":{"properties":{"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["api_key"],"title":"LoginRequest"},"NarrationCreateRequest":{"properties":{"book_id":{"type":"string","title":"Book Id"},"voice_id":{"type":"string","title":"Voice Id"},"max_chapters":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Chapters","description":"Limit to first N chapters"}},"type":"object","required":["book_id","voice_id"],"title":"NarrationCreateRequest"},"NarrationEstimateRequest":{"properties":{"book_id":{"type":"string","title":"Book Id"},"max_chapters":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Chapters","description":"Limit to first N chapters"}},"type":"object","required":["book_id"],"title":"NarrationEstimateRequest"},"OrcidVerifyRequest":{"properties":{"orcid_id":{"type":"string","maxLength":19,"title":"Orcid Id"}},"type":"object","required":["orcid_id"],"title":"OrcidVerifyRequest"},"OrcidVerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"gravity_level":{"type":"integer","title":"Gravity Level"},"orcid_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orcid Name"}},"type":"object","required":["verified","gravity_level"],"title":"OrcidVerifyResponse"},"PublishBookRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subtitle"},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Description"},"format":{"type":"string","enum":["paper","essay","post"],"title":"Format","default":"post"},"authors":{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","maxItems":20,"title":"Authors"},"chapters":{"items":{"$ref":"#/components/schemas/ChapterInput"},"type":"array","maxItems":200,"minItems":1,"title":"Chapters"},"tags":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tags"},"metadata":{"type":"object","title":"Metadata"},"options":{"$ref":"#/components/schemas/PublishOptions","default":{"listed":true,"og_image":"auto"}},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"license":{"type":"string","enum":["all-rights-reserved","cc-by-4.0","cc-by-sa-4.0","cc-by-nc-4.0","cc-by-nc-sa-4.0","cc0"],"title":"License","default":"all-rights-reserved"}},"type":"object","required":["title","chapters"],"title":"PublishBookRequest"},"PublishBookResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"chapters":{"items":{"$ref":"#/components/schemas/ChapterResponse"},"type":"array","title":"Chapters"},"quality_score":{"type":"integer","title":"Quality Score"},"quality_breakdown":{"$ref":"#/components/schemas/QualityBreakdown"},"total_word_count":{"type":"integer","title":"Total Word Count"},"chapter_count":{"type":"integer","title":"Chapter Count"},"author_gravity":{"type":"integer","title":"Author Gravity"},"license":{"type":"string","title":"License","default":"all-rights-reserved"}},"type":"object","required":["id","url","title","chapters","quality_score","quality_breakdown","total_word_count","chapter_count","author_gravity"],"title":"PublishBookResponse"},"PublishOptions":{"properties":{"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"},"listed":{"type":"boolean","title":"Listed","default":true},"og_image":{"type":"string","title":"Og Image","default":"auto"}},"type":"object","title":"PublishOptions"},"PublishResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"permanent_url":{"type":"string","title":"Permanent Url"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"word_count":{"type":"integer","title":"Word Count"},"reading_time_minutes":{"type":"integer","title":"Reading Time Minutes"},"content_hash":{"type":"string","title":"Content Hash"},"quality_score":{"type":"integer","title":"Quality Score"},"quality_breakdown":{"$ref":"#/components/schemas/QualityBreakdown"},"quality_suggestions":{"items":{"type":"string"},"type":"array","title":"Quality Suggestions"},"author_gravity":{"type":"integer","title":"Author Gravity"},"author_gravity_badges":{"items":{"type":"string"},"type":"array","title":"Author Gravity Badges"},"gravity_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gravity Note"},"license":{"type":"string","title":"License","default":"all-rights-reserved"}},"type":"object","required":["id","url","permanent_url","version","created_at","word_count","reading_time_minutes","content_hash","quality_score","quality_breakdown","quality_suggestions","author_gravity","author_gravity_badges"],"title":"PublishResponse"},"QualityBreakdown":{"properties":{"structure":{"type":"integer","title":"Structure"},"substance":{"type":"integer","title":"Substance"},"tone":{"type":"integer","title":"Tone"},"attribution":{"type":"integer","title":"Attribution"}},"type":"object","required":["structure","substance","tone","attribution"],"title":"QualityBreakdown"},"ReorderChaptersRequest":{"properties":{"chapter_order":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Chapter Order","description":"Document IDs in desired order"}},"type":"object","required":["chapter_order"],"title":"ReorderChaptersRequest"},"SearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["results","total","limit","offset"],"title":"SearchResponse"},"SearchResult":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"url":{"type":"string","title":"Url"},"authors":{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","title":"Authors"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"quality_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quality Score"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"}},"type":"object","required":["id","title","subtitle","url","authors","tags","quality_score","word_count","created_at"],"title":"SearchResult"},"UpdateFileRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"UpdateFileRequest"},"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"},"VersionResponse":{"properties":{"version":{"type":"integer","title":"Version"},"content_hash":{"type":"string","title":"Content Hash"},"word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Word Count"},"reading_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reading Time"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["version","content_hash","word_count","reading_time","created_at"],"title":"VersionResponse"},"app__routes__write__PublishRequest":{"properties":{"format":{"type":"string","title":"Format","default":"post"},"license":{"type":"string","title":"License","default":"all-rights-reserved"},"authors":{"items":{"type":"object"},"type":"array","title":"Authors","default":[]},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"publish_as":{"type":"string","title":"Publish As","default":"auto"}},"type":"object","title":"PublishRequest"},"app__schemas__PublishRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subtitle"},"content":{"type":"string","maxLength":500000,"minLength":1,"title":"Content"},"format":{"type":"string","enum":["paper","essay","post","markdown","academic","report","tutorial"],"title":"Format","default":"post"},"authors":{"items":{"$ref":"#/components/schemas/AuthorInfo"},"type":"array","maxItems":20,"title":"Authors"},"metadata":{"type":"object","title":"Metadata"},"options":{"$ref":"#/components/schemas/PublishOptions","default":{"listed":true,"og_image":"auto"}},"tags":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tags"},"license":{"type":"string","enum":["all-rights-reserved","cc-by-4.0","cc-by-sa-4.0","cc-by-nc-4.0","cc-by-nc-sa-4.0","cc0"],"title":"License","default":"all-rights-reserved"}},"type":"object","required":["title","content"],"title":"PublishRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}