{"openapi":"3.1.0","info":{"title":"Perspective Engine API","description":"Make any number meaningful through contextual comparisons.","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","description":"Liveness probe — fast, no DB.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ready":{"get":{"summary":"Readiness","description":"Readiness probe — checks DB connectivity.","operationId":"readiness_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics","description":"Application metrics for monitoring.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"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/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Request a password reset. Always returns success (no user enumeration).","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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset password using a valid token.","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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/delete-account":{"post":{"tags":["auth"],"summary":"Delete Account","description":"Self-serve account deletion (the GDPR/CCPA path promised in the\nprivacy policy). Requires re-entering the password so a stolen or\nleft-open session can't destroy the account on its own.\n\nDeletes the user row; sessions, library entries, follows, and reset\ntokens go with it via ON DELETE CASCADE. Audit entries survive by\ndesign (no FK, denormalized username) as the retention record.","operationId":"delete_account_api_v1_auth_delete_account_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Confirm an email address using the token from the signup 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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Send a fresh verification email to the logged-in user.","operationId":"resend_verification_api_v1_auth_resend_verification_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/upgrade-tier":{"post":{"tags":["auth"],"summary":"Upgrade Tier","description":"Upgrade current user to pro. MVP: instant, no payment required.\n\nRequires a verified email: pro unlocks the cost-bearing features\n(OpenAI image generation), so an unverified throwaway account must\nnot be able to self-upgrade into them.","operationId":"upgrade_tier_api_v1_auth_upgrade_tier_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/perspectives":{"post":{"tags":["perspectives"],"summary":"Create Perspectives","description":"Generate perspectives for a number.\n\nProvide either `text` (free text with a number) or `value` + `unit`.\nAuthenticated users get personalized ranking from their feedback history.","operationId":"create_perspectives_api_v1_perspectives_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspectiveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspectiveResultResponse-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/references":{"get":{"tags":["references"],"summary":"List References","description":"Browse the reference object database (DB-backed, includes all datasets).\nAdmin-only — regular users see references only via generated perspectives.","operationId":"list_references_api_v1_references_get","parameters":[{"name":"dimension","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dimension"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"min_familiarity","in":"query","required":false,"schema":{"type":"number","maximum":1,"minimum":0,"default":0.0,"title":"Min Familiarity"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"provenance","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by where the row came from (curated, llm_user_qa). Used by the admin review queue.","title":"Provenance"},"description":"Filter by where the row came from (curated, llm_user_qa). Used by the admin review queue."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/references/{slug}":{"get":{"tags":["references"],"summary":"Get Reference","description":"Get details for a single reference object. Admin-only.","operationId":"get_reference_api_v1_references__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/references/import":{"post":{"tags":["references"],"summary":"Import References","description":"Import references from a JSON array. Pro users only.\nEach ref is stored as private to the importing user.","operationId":"import_references_api_v1_references_import_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/references/import-csv":{"post":{"tags":["references"],"summary":"Import Csv","description":"Import references from a CSV file. Pro users only.\nCSV columns: name, dimension, value, unit, category, icon,\n             familiarity, source_url, display_name","operationId":"import_csv_api_v1_references_import_csv_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_csv_api_v1_references_import_csv_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/references/{ref_id}":{"delete":{"tags":["references"],"summary":"Delete Reference","description":"Delete a user-imported reference (own refs only).","operationId":"delete_reference_api_v1_references__ref_id__delete","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/references/seed":{"post":{"tags":["references"],"summary":"Seed References","description":"Seed global references (no auth required, adds as public/global).\nUsed by data pipeline scripts to populate the DB.","operationId":"seed_references_api_v1_references_seed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Record feedback on a perspective.","operationId":"submit_feedback_api_v1_feedback_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/library":{"post":{"tags":["library"],"summary":"Create Entry","operationId":"create_entry_api_v1_library_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLibraryEntryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["library"],"summary":"List Own Library","operationId":"list_own_library_api_v1_library_get","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"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/library/{entry_id}/image":{"get":{"tags":["library"],"summary":"Get Library Entry Image","description":"Serve the image attached to a library entry (if any).","operationId":"get_library_entry_image_api_v1_library__entry_id__image_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["library"],"summary":"Upload Library Entry Image","description":"Attach an image to a library entry (resized to 1200x630 PNG).","operationId":"upload_library_entry_image_api_v1_library__entry_id__image_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_library_entry_image_api_v1_library__entry_id__image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/library/public":{"get":{"tags":["library"],"summary":"List Public Library","operationId":"list_public_library_api_v1_library_public_get","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":{"$ref":"#/components/schemas/LibraryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/explore":{"get":{"tags":["library"],"summary":"Explore Profiles","description":"Discovery feed: one card per user who has at least one public entry,\nshowing that user's latest public perspective as a preview. Ordered\nnewest-first by the latest entry's creation time.","operationId":"explore_profiles_api_v1_explore_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExploreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/library/{entry_id}":{"get":{"tags":["library"],"summary":"Get Entry","operationId":"get_entry_api_v1_library__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["library"],"summary":"Update Entry Visibility","operationId":"update_entry_visibility_api_v1_library__entry_id__patch","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["library"],"summary":"Delete Entry","operationId":"delete_entry_api_v1_library__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/following":{"get":{"tags":["users"],"summary":"List My Following","operationId":"list_my_following_api_v1_me_following_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{username}":{"get":{"tags":["users"],"summary":"Get User Profile","operationId":"get_user_profile_api_v1_users__username__get","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{username}/follow":{"post":{"tags":["users"],"summary":"Follow User","operationId":"follow_user_api_v1_users__username__follow_post","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Unfollow User","operationId":"unfollow_user_api_v1_users__username__follow_delete","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/image-prompt":{"post":{"tags":["share"],"summary":"Get Image Prompt","description":"Generate an AI image prompt for a perspective (pro only).","operationId":"get_image_prompt_api_v1_image_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePromptRequest"}}},"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/generate-image":{"post":{"tags":["share"],"summary":"Generate Comparison Image","description":"Generate an AI comparison image via OpenAI (Pro tier or admin).\n\nRate-limited: each call costs real money (~$0.04/image at current\nOpenAI pricing), so even Pro accounts don't get an uncapped loop.","operationId":"generate_comparison_image_api_v1_generate_image_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePromptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/share":{"post":{"tags":["share"],"summary":"Create Share","description":"Create a shareable permalink for a perspective.","operationId":"create_share_api_v1_share_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/share/{share_id}/image":{"post":{"tags":["share"],"summary":"Upload Share Image","description":"Upload an optional image for a shared perspective. Resized to 1200x630.","operationId":"upload_share_image_api_v1_share__share_id__image_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_share_image_api_v1_share__share_id__image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/share/{share_id}":{"get":{"tags":["share"],"summary":"Get Share","description":"Get share data as JSON.","operationId":"get_share_api_v1_share__share_id__get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/share/{share_id}/og.png":{"get":{"tags":["share"],"summary":"Get Og Image Png","description":"Always the standard editorial card. A share that carries an image\n(uploaded or AI-generated) gets it composited as the top band of\nthe card, so the brand identity is constant either way.","operationId":"get_og_image_png_api_v1_share__share_id__og_png_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users":{"get":{"tags":["admin"],"summary":"List Users","description":"List all users.","operationId":"list_users_api_v1_admin_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}":{"patch":{"tags":["admin"],"summary":"Update User","description":"Update a user's tier or admin status.","operationId":"update_user_api_v1_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete User","description":"Delete a user and all their data.","operationId":"delete_user_api_v1_admin_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/stats":{"get":{"tags":["admin"],"summary":"Ref Stats","description":"Reference database statistics by dimension.","operationId":"ref_stats_api_v1_admin_refs_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/sources":{"get":{"tags":["admin"],"summary":"List Pipeline Sources","description":"List all registered data sources with their declarative config.\nBacks the future Data Sources admin UI; the pipeline-run endpoint\ndispatches against the same registry.","operationId":"list_pipeline_sources_api_v1_admin_sources_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceInfo"},"title":"Response List Pipeline Sources Api V1 Admin Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs":{"get":{"tags":["admin"],"summary":"List Refs","description":"Paginated reference browser for admins. Supports filtering by\ndimension/category, search across name/display_name/slug, the\n`missing_source=true` filter for the source_url backfill workflow,\nand `source_id` to scope to rows written by one pipeline.","operationId":"list_refs_api_v1_admin_refs_get","parameters":[{"name":"dimension","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dimension"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"missing_source","in":"query","required":false,"schema":{"type":"boolean","description":"Only refs without source_url","default":false,"title":"Missing Source"},"description":"Only refs without source_url"},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only refs that any version row tagged with this source_id","title":"Source Id"},"description":"Only refs that any version row tagged with this source_id"},{"name":"brand","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only refs with this brand","title":"Brand"},"description":"Only refs with this brand"},{"name":"sponsor_tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only refs at this sponsor_tier (none/featured/premium)","title":"Sponsor Tier"},"description":"Only refs at this sponsor_tier (none/featured/premium)"},{"name":"provenance","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only refs with this provenance (curated/llm_user_qa). Use 'llm_user_qa' for the admin review queue.","title":"Provenance"},"description":"Only refs with this provenance (curated/llm_user_qa). Use 'llm_user_qa' for the admin review queue."},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Tombstone filter: active (default) | retired | all.","default":"active","title":"Status"},"description":"Tombstone filter: active (default) | retired | all."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Ref","description":"Create a new reference row manually. value_si is computed from\ndisplay_value + display_unit + dimension via the normalizer so the\nrow is immediately usable by the engine. Slug + display_name\ndefault to derivations of `name` if omitted.","operationId":"create_ref_api_v1_admin_refs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/{ref_id}":{"patch":{"tags":["admin"],"summary":"Update Ref","description":"Update curatable fields on a single reference. Any subset of\nUpdateRefRequest's fields may be passed. When display_value or\ndisplay_unit changes, value_si is recomputed from them. Returns the\nupdated row.","operationId":"update_ref_api_v1_admin_refs__ref_id__patch","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRefRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Ref","description":"Retire a reference row (soft delete / tombstone). The row stays\nwith status='retired': lookups exclude it and re-seeds/pipelines\ncannot resurrect it. Use POST /refs/{ref_id}/restore to undo.\nreference_versions history is preserved (audit trail).","operationId":"delete_ref_api_v1_admin_refs__ref_id__delete","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/{ref_id}/restore":{"post":{"tags":["admin"],"summary":"Restore Ref","description":"Un-retire a reference: it becomes active, visible to lookups,\nand updatable by seeds/pipelines again.","operationId":"restore_ref_api_v1_admin_refs__ref_id__restore_post","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/{ref_id}/versions":{"get":{"tags":["admin"],"summary":"List Ref Versions","description":"Return the version history for one reference, newest first.\nBacks the History expander in the admin Refs Browser.","operationId":"list_ref_versions_api_v1_admin_refs__ref_id__versions_get","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/pipeline/{source}/dry-run":{"post":{"tags":["admin"],"summary":"Dry Run Pipeline","description":"Preview a pipeline run: fetch the candidate rows, diff them\nagainst current DB state, and return new/changed/unchanged counts\nplus a small sample. Writes nothing.","operationId":"dry_run_pipeline_api_v1_admin_refs_pipeline__source__dry_run_post","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/debug/sentry-test":{"post":{"tags":["admin"],"summary":"Sentry Test","description":"Deliberately raise an uncaught exception to confirm Sentry is wired.\n\nAdmin-only; safe to call in any environment. Returns 500 (expected);\na matching event should appear in the Sentry dashboard within ~5s. If\nnothing appears, SENTRY_DSN is wrong, the network egress is blocked,\nor the SDK didn't initialize at boot.","operationId":"sentry_test_api_v1_admin_debug_sentry_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/seed":{"post":{"tags":["admin"],"summary":"Trigger Seed","description":"Insert any missing built-in refs from the legacy + bulk seed\ndatasets. Existing rows are never modified — the seed is a static\nbootstrap snapshot, and updates belong to pipelines and admins.","operationId":"trigger_seed_api_v1_admin_refs_seed_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/pipeline/{source}":{"post":{"tags":["admin"],"summary":"Run Pipeline","description":"Run a data pipeline to fetch + import references from external APIs.\nSources: worldbank, foods","operationId":"run_pipeline_api_v1_admin_refs_pipeline__source__post","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/refs/clear-user/{user_id}":{"delete":{"tags":["admin"],"summary":"Clear User Refs","description":"Delete all imported references for a specific user.","operationId":"clear_user_refs_api_v1_admin_refs_clear_user__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/feedback":{"get":{"tags":["admin"],"summary":"Feedback Summary","description":"Perspective feedback rollup: signal totals, most-voted\nreferences, per-strategy tallies, recent raw votes. This is the\nread side of the learning loop — the same signals already adjust\nranking (personal prefs + global adjustments at 10+ votes).","operationId":"feedback_summary_api_v1_admin_feedback_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/contact-messages":{"get":{"tags":["admin"],"summary":"Contact Messages","description":"The /contact form's inbox, newest first.","operationId":"contact_messages_api_v1_admin_contact_messages_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/contact-messages/{msg_id}/read":{"post":{"tags":["admin"],"summary":"Mark Contact Read","operationId":"mark_contact_read_api_v1_admin_contact_messages__msg_id__read_post","parameters":[{"name":"msg_id","in":"path","required":true,"schema":{"type":"string","title":"Msg Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/today-candidates":{"get":{"tags":["admin"],"summary":"Today Candidates","description":"The viral-number scout's ranked candidate list.","operationId":"today_candidates_api_v1_admin_today_candidates_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"new","title":"Status"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/today-candidates/refresh":{"post":{"tags":["admin"],"summary":"Refresh Today Candidates","description":"Run the scout now: scan Reddit / Hacker News / EIA for today's\nviral numbers and store the parseable ones as candidates.","operationId":"refresh_today_candidates_api_v1_admin_today_candidates_refresh_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/today-candidates/{cand_id}/status":{"post":{"tags":["admin"],"summary":"Set Candidate Status","operationId":"set_candidate_status_api_v1_admin_today_candidates__cand_id__status_post","parameters":[{"name":"cand_id","in":"path","required":true,"schema":{"type":"string","title":"Cand Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/stats":{"get":{"tags":["admin"],"summary":"System Stats","description":"Overall system statistics.","operationId":"system_stats_api_v1_admin_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/make-admin":{"post":{"tags":["admin"],"summary":"Make Self Admin","description":"MVP: any user can make themselves admin (no admin exists yet).\nIn production, remove this endpoint and seed admin via DB.","operationId":"make_self_admin_api_v1_admin_make_admin_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/audit-log":{"get":{"tags":["admin"],"summary":"List Audit","description":"Recent audit entries, newest first. Admin-only.\n\nFilter by exact action string (e.g. 'auth.login.failure') or by\nuser_id. Combining both ANDs the filters.","operationId":"list_audit_api_v1_admin_audit_log_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/backup-dump":{"get":{"tags":["admin"],"summary":"Backup Dump","description":"Download a full database dump as JSON.\n\nSame shape `scripts/db_dump.py` writes locally (single source of\ntruth in `app/db/backup.py`). Used both for routine ops backups\nand as the bridge for the SQLite -> Postgres cutover (see\ndocs/backups.md).\n\nSecurity:\n  - Admin-only (same gate as every other /admin route).\n  - Source DSN is redacted from the metadata header so the\n    downloaded artifact never carries credentials.\n  - Audit log records who downloaded a dump, from which IP,\n    when. The dump itself contains user data, so this row is\n    the chain-of-custody marker.\n  - Skipped tables include sessions and password_reset_tokens —\n    nothing actively-credentialed leaves the box.\n\nOperationally: response is a single JSON file. For DBs up to\n~hundreds of MB this is fine; if the dump exceeds memory\npressure we'd switch to streaming via StreamingResponse.","operationId":"backup_dump_api_v1_admin_backup_dump_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/llm/status":{"get":{"tags":["admin"],"summary":"Llm Status","description":"Live diagnostics for the Groq input layer.\n\nThe resolver/tagger/rewriter all swallow LLM failures by design\n(the app must keep working without the LLM), which makes a broken\nkey or a decommissioned model invisible from the outside. This\nendpoint makes one tiny real call and reports exactly what Groq\nsaid, so \"key is set but nothing happens\" is debuggable from the\nadmin account without reading server logs.","operationId":"llm_status_api_v1_admin_llm_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/today":{"get":{"tags":["today"],"summary":"Get Today Feed","operationId":"get_today_feed_api_v1_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/today":{"post":{"tags":["today"],"summary":"Create Today Post","operationId":"create_today_post_api_v1_admin_today_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayPostCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/today/{post_id}/image":{"get":{"tags":["today"],"summary":"Get Today Post Image","description":"Serve the image attached to a Today post (public).","operationId":"get_today_post_image_api_v1_today__post_id__image_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/today/{post_id}/image":{"post":{"tags":["today"],"summary":"Upload Today Post Image","description":"Attach the pinned generation's image (uploaded or AI) to a\nToday post. Aspect ratio preserved; longest side capped.","operationId":"upload_today_post_image_api_v1_admin_today__post_id__image_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_today_post_image_api_v1_admin_today__post_id__image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/today/{post_id}":{"delete":{"tags":["today"],"summary":"Delete Today Post","operationId":"delete_today_post_api_v1_admin_today__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contact":{"post":{"tags":["contact"],"summary":"Submit Contact","operationId":"submit_contact_api_v1_contact_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminRefListResponse":{"properties":{"refs":{"items":{"$ref":"#/components/schemas/AdminRefRow"},"type":"array","title":"Refs"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["refs","total","limit","offset"],"title":"AdminRefListResponse"},"AdminRefRow":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"slug":{"type":"string","title":"Slug"},"category":{"type":"string","title":"Category"},"icon":{"type":"string","title":"Icon","default":""},"dimension":{"type":"string","title":"Dimension"},"value_si":{"type":"number","title":"Value Si"},"display_value":{"type":"number","title":"Display Value"},"display_unit":{"type":"string","title":"Display Unit"},"familiarity":{"type":"number","title":"Familiarity","default":0.5},"variance_cv":{"type":"number","title":"Variance Cv","default":0.1},"source_url":{"type":"string","title":"Source Url","default":""},"year":{"type":"string","title":"Year","default":""},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"},"brand":{"type":"string","title":"Brand","default":""},"product":{"type":"string","title":"Product","default":""},"sponsor_tier":{"type":"string","title":"Sponsor Tier","default":"none"},"image_url":{"type":"string","title":"Image Url","default":""},"provenance":{"type":"string","title":"Provenance","default":"curated"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["id","name","display_name","slug","category","dimension","value_si","display_value","display_unit"],"title":"AdminRefRow"},"AdminUserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/AdminUserResponse"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"AdminUserListResponse"},"AdminUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"bio":{"type":"string","title":"Bio"},"tier":{"type":"string","title":"Tier"},"is_admin":{"type":"boolean","title":"Is Admin"},"email_verified":{"type":"boolean","title":"Email Verified"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","username","email","display_name","bio","tier","is_admin","email_verified","created_at"],"title":"AdminUserResponse"},"AuditLogEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"username":{"type":"string","title":"Username","default":""},"action":{"type":"string","title":"Action"},"target_type":{"type":"string","title":"Target Type","default":""},"target_id":{"type":"string","title":"Target Id","default":""},"ip":{"type":"string","title":"Ip","default":""},"user_agent":{"type":"string","title":"User Agent","default":""},"metadata":{"type":"string","title":"Metadata","default":"{}"},"status":{"type":"string","title":"Status","default":"success"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","action","created_at"],"title":"AuditLogEntryResponse"},"AuditLogListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AuditLogEntryResponse"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["entries","total","limit","offset"],"title":"AuditLogListResponse"},"AuthResponse":{"properties":{"token":{"type":"string","title":"Token"},"user":{"$ref":"#/components/schemas/PublicUser"}},"type":"object","required":["token","user"],"title":"AuthResponse"},"Body_import_csv_api_v1_references_import_csv_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_csv_api_v1_references_import_csv_post"},"Body_upload_library_entry_image_api_v1_library__entry_id__image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_library_entry_image_api_v1_library__entry_id__image_post"},"Body_upload_share_image_api_v1_share__share_id__image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_share_image_api_v1_share__share_id__image_post"},"Body_upload_today_post_image_api_v1_admin_today__post_id__image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_today_post_image_api_v1_admin_today__post_id__image_post"},"ContactRequest":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","default":""},"email":{"type":"string","maxLength":254,"title":"Email"},"message":{"type":"string","maxLength":5000,"minLength":10,"title":"Message"},"website":{"type":"string","maxLength":200,"title":"Website","default":""}},"type":"object","required":["email","message"],"title":"ContactRequest"},"ContactResponse":{"properties":{"received":{"type":"boolean","title":"Received"}},"type":"object","required":["received"],"title":"ContactResponse"},"CreateLibraryEntryRequest":{"properties":{"visibility":{"type":"string","enum":["private","public"],"title":"Visibility"},"result":{"$ref":"#/components/schemas/PerspectiveResultResponse-Input"},"title":{"type":"string","maxLength":120,"title":"Title","default":""}},"type":"object","required":["visibility","result"],"title":"CreateLibraryEntryRequest"},"CreateRefRequest":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"category":{"type":"string","title":"Category"},"icon":{"type":"string","title":"Icon","default":""},"dimension":{"type":"string","title":"Dimension"},"display_value":{"type":"number","title":"Display Value"},"display_unit":{"type":"string","title":"Display Unit"},"familiarity":{"type":"number","title":"Familiarity","default":0.5},"source_url":{"type":"string","title":"Source Url","default":""},"year":{"type":"string","title":"Year","default":""},"provenance":{"type":"string","title":"Provenance","default":"admin_manual"}},"type":"object","required":["name","category","dimension","display_value","display_unit"],"title":"CreateRefRequest"},"DeleteAccountRequest":{"properties":{"password":{"type":"string","maxLength":72,"minLength":1,"title":"Password"}},"type":"object","required":["password"],"title":"DeleteAccountRequest"},"DryRunResponse":{"properties":{"source":{"type":"string","title":"Source"},"new_count":{"type":"integer","title":"New Count"},"changed_count":{"type":"integer","title":"Changed Count"},"unchanged_count":{"type":"integer","title":"Unchanged Count"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"diff_sample":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Diff Sample"}},"type":"object","required":["source","new_count","changed_count","unchanged_count","errors","diff_sample"],"title":"DryRunResponse"},"ExploreProfileCard":{"properties":{"user":{"$ref":"#/components/schemas/ExploreProfileUser"},"public_count":{"type":"integer","title":"Public Count"},"latest_entry":{"$ref":"#/components/schemas/LibraryEntryResponse"},"is_following":{"type":"boolean","title":"Is Following","default":false},"is_self":{"type":"boolean","title":"Is Self","default":false}},"type":"object","required":["user","public_count","latest_entry"],"title":"ExploreProfileCard"},"ExploreProfileUser":{"properties":{"id":{"type":"string","title":"Id"},"username":{"type":"string","title":"Username"},"display_name":{"type":"string","title":"Display Name"},"bio":{"type":"string","title":"Bio"}},"type":"object","required":["id","username","display_name","bio"],"title":"ExploreProfileUser"},"ExploreResponse":{"properties":{"profiles":{"items":{"$ref":"#/components/schemas/ExploreProfileCard"},"type":"array","title":"Profiles"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["profiles","total"],"title":"ExploreResponse"},"FeedbackRequest":{"properties":{"perspective_id":{"type":"string","maxLength":100,"title":"Perspective Id"},"generation_id":{"type":"string","maxLength":100,"title":"Generation Id","default":""},"signal":{"type":"string","maxLength":20,"title":"Signal"},"reference_id":{"type":"string","maxLength":100,"title":"Reference Id","default":""},"reference_slug":{"type":"string","maxLength":100,"title":"Reference Slug","default":""},"reference_category":{"type":"string","maxLength":50,"title":"Reference Category","default":""},"strategy":{"type":"string","maxLength":50,"title":"Strategy","default":""}},"type":"object","required":["perspective_id","signal"],"title":"FeedbackRequest"},"FeedbackResponse":{"properties":{"recorded":{"type":"boolean","title":"Recorded"}},"type":"object","required":["recorded"],"title":"FeedbackResponse"},"FollowingListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/FollowingUser"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"FollowingListResponse"},"FollowingUser":{"properties":{"username":{"type":"string","title":"Username"},"display_name":{"type":"string","title":"Display Name"},"bio":{"type":"string","title":"Bio"},"followed_at":{"type":"string","title":"Followed At"}},"type":"object","required":["username","display_name","bio","followed_at"],"title":"FollowingUser"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","maxLength":120,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImagePromptRequest":{"properties":{"perspective_text":{"type":"string","maxLength":2000,"title":"Perspective Text"},"reference_name":{"type":"string","maxLength":200,"title":"Reference Name","default":""},"reference_icon":{"type":"string","maxLength":10,"title":"Reference Icon","default":""},"reference_category":{"type":"string","maxLength":50,"title":"Reference Category","default":""},"input_dimension":{"type":"string","maxLength":50,"title":"Input Dimension","default":""},"ratio":{"type":"number","title":"Ratio","default":1.0},"headline":{"type":"string","maxLength":500,"title":"Headline","default":""}},"type":"object","required":["perspective_text"],"title":"ImagePromptRequest"},"ImportRefRow":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"dimension":{"type":"string","maxLength":50,"title":"Dimension"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","maxLength":50,"title":"Unit"},"category":{"type":"string","maxLength":50,"title":"Category","default":"custom"},"icon":{"type":"string","maxLength":10,"title":"Icon","default":""},"familiarity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Familiarity","default":0.5},"source_url":{"type":"string","maxLength":500,"title":"Source Url","default":""},"display_name":{"type":"string","maxLength":300,"title":"Display Name","default":""}},"type":"object","required":["name","dimension","value","unit"],"title":"ImportRefRow"},"ImportRequest":{"properties":{"references":{"items":{"$ref":"#/components/schemas/ImportRefRow"},"type":"array","title":"References"}},"type":"object","required":["references"],"title":"ImportRequest"},"ImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["imported","errors"],"title":"ImportResponse"},"InputResponse":{"properties":{"value":{"type":"number","title":"Value"},"unit":{"type":"string","title":"Unit"},"value_si":{"type":"number","title":"Value Si"},"si_unit":{"type":"string","title":"Si Unit"},"dimension":{"type":"string","title":"Dimension"},"context":{"type":"string","title":"Context","default":""},"source_url":{"type":"string","title":"Source Url","default":""}},"type":"object","required":["value","unit","value_si","si_unit","dimension"],"title":"InputResponse"},"LibraryAuthor":{"properties":{"username":{"type":"string","title":"Username"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["username","display_name"],"title":"LibraryAuthor"},"LibraryEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"visibility":{"type":"string","enum":["private","public"],"title":"Visibility"},"input_value":{"type":"number","title":"Input Value"},"input_unit":{"type":"string","title":"Input Unit"},"input_dimension":{"type":"string","title":"Input Dimension"},"input_context":{"type":"string","title":"Input Context"},"title":{"type":"string","title":"Title"},"result":{"$ref":"#/components/schemas/PerspectiveResultResponse-Output"},"image_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Path"},"created_at":{"type":"string","title":"Created At"},"author":{"anyOf":[{"$ref":"#/components/schemas/LibraryAuthor"},{"type":"null"}]}},"type":"object","required":["id","user_id","visibility","input_value","input_unit","input_dimension","input_context","title","result","created_at"],"title":"LibraryEntryResponse"},"LibraryListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/LibraryEntryResponse"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entries","total"],"title":"LibraryListResponse"},"LoginRequest":{"properties":{"email":{"type":"string","maxLength":120,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":72,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MeResponse":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/PublicUser"},{"type":"null"}]},"library_count":{"type":"integer","title":"Library Count","default":0},"public_count":{"type":"integer","title":"Public Count","default":0},"follower_count":{"type":"integer","title":"Follower Count","default":0},"following_count":{"type":"integer","title":"Following Count","default":0}},"type":"object","title":"MeResponse"},"MeasurementResponse":{"properties":{"value_si":{"type":"number","title":"Value Si"},"display_value":{"type":"number","title":"Display Value"},"display_unit":{"type":"string","title":"Display Unit"},"variance_cv":{"type":"number","title":"Variance Cv"}},"type":"object","required":["value_si","display_value","display_unit","variance_cv"],"title":"MeasurementResponse"},"PerspectiveRequest":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Text"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Unit"},"dimension":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Dimension"},"context":{"type":"string","maxLength":500,"title":"Context","default":""},"input_source_url":{"type":"string","maxLength":500,"title":"Input Source Url","default":""},"user":{"anyOf":[{"$ref":"#/components/schemas/UserInput"},{"type":"null"}]},"num_results":{"type":"integer","maximum":6.0,"minimum":1.0,"title":"Num Results","default":4},"creative":{"type":"boolean","title":"Creative","description":"AI-rewritten perspectives (pro tier only)","default":false}},"type":"object","title":"PerspectiveRequest"},"PerspectiveResponse":{"properties":{"id":{"type":"string","title":"Id"},"strategy":{"type":"string","title":"Strategy"},"text":{"type":"string","title":"Text"},"reference":{"$ref":"#/components/schemas/ReferenceResponse"},"ratio":{"type":"number","title":"Ratio"},"formatted_ratio":{"type":"string","title":"Formatted Ratio"},"score":{"type":"number","title":"Score"},"score_breakdown":{"anyOf":[{"$ref":"#/components/schemas/ScoreBreakdownResponse"},{"type":"null"}]},"visual_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visual Type"},"sources":{"items":{"$ref":"#/components/schemas/PerspectiveSourceResponse"},"type":"array","title":"Sources"}},"type":"object","required":["id","strategy","text","reference","ratio","formatted_ratio","score"],"title":"PerspectiveResponse"},"PerspectiveResultResponse-Input":{"properties":{"id":{"type":"string","title":"Id"},"input":{"$ref":"#/components/schemas/InputResponse"},"perspectives":{"items":{"$ref":"#/components/schemas/PerspectiveResponse"},"type":"array","title":"Perspectives"},"generation_time_ms":{"type":"number","title":"Generation Time Ms"},"personalized":{"type":"boolean","title":"Personalized"},"resolved":{"anyOf":[{"$ref":"#/components/schemas/ResolvedFactResponse"},{"type":"null"}]}},"type":"object","required":["id","input","perspectives","generation_time_ms","personalized"],"title":"PerspectiveResultResponse"},"PerspectiveResultResponse-Output":{"properties":{"id":{"type":"string","title":"Id"},"input":{"$ref":"#/components/schemas/InputResponse"},"perspectives":{"items":{"$ref":"#/components/schemas/PerspectiveResponse"},"type":"array","title":"Perspectives"},"generation_time_ms":{"type":"number","title":"Generation Time Ms"},"personalized":{"type":"boolean","title":"Personalized"},"resolved":{"anyOf":[{"$ref":"#/components/schemas/ResolvedFactResponse"},{"type":"null"}]}},"type":"object","required":["id","input","perspectives","generation_time_ms","personalized"],"title":"PerspectiveResultResponse"},"PerspectiveSourceResponse":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"}},"type":"object","required":["name","url"],"title":"PerspectiveSourceResponse","description":"One component's citation in a multi-reference perspective."},"PublicUser":{"properties":{"id":{"type":"string","title":"Id"},"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"bio":{"type":"string","title":"Bio"},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"tier":{"type":"string","title":"Tier","default":"free"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","username","email","display_name","bio","created_at"],"title":"PublicUser"},"RefVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/RefVersionRow"},"type":"array","title":"Versions"}},"type":"object","required":["versions"],"title":"RefVersionListResponse"},"RefVersionRow":{"properties":{"id":{"type":"string","title":"Id"},"ref_id":{"type":"string","title":"Ref Id"},"fetched_at":{"type":"string","title":"Fetched At"},"source_id":{"type":"string","title":"Source Id"},"source_url":{"type":"string","title":"Source Url"},"value_si":{"type":"number","title":"Value Si"},"display_value":{"type":"number","title":"Display Value"},"display_unit":{"type":"string","title":"Display Unit"},"year":{"type":"string","title":"Year"},"raw_hash":{"type":"string","title":"Raw Hash"},"run_id":{"type":"string","title":"Run Id"},"change_type":{"type":"string","title":"Change Type"}},"type":"object","required":["id","ref_id","fetched_at","source_id","source_url","value_si","display_value","display_unit","year","raw_hash","run_id","change_type"],"title":"RefVersionRow"},"ReferenceDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"slug":{"type":"string","title":"Slug"},"category":{"type":"string","title":"Category"},"icon":{"type":"string","title":"Icon"},"dimension":{"type":"string","title":"Dimension"},"measurement":{"$ref":"#/components/schemas/MeasurementResponse"},"familiarity":{"type":"number","title":"Familiarity"},"source_url":{"type":"string","title":"Source Url","default":""},"year":{"type":"string","title":"Year","default":""},"provenance":{"type":"string","title":"Provenance","default":"curated"},"regional_familiarity":{"additionalProperties":{"type":"number"},"type":"object","title":"Regional Familiarity"}},"type":"object","required":["id","name","display_name","slug","category","icon","dimension","measurement","familiarity","regional_familiarity"],"title":"ReferenceDetailResponse"},"ReferenceListResponse":{"properties":{"references":{"items":{"$ref":"#/components/schemas/ReferenceDetailResponse"},"type":"array","title":"References"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["references","total","limit","offset"],"title":"ReferenceListResponse"},"ReferenceResponse":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","title":"Unit"},"icon":{"type":"string","title":"Icon"},"category":{"type":"string","title":"Category"},"familiarity":{"type":"number","title":"Familiarity"},"source_url":{"type":"string","title":"Source Url","default":""},"brand":{"type":"string","title":"Brand","default":""},"product":{"type":"string","title":"Product","default":""},"sponsor_tier":{"type":"string","title":"Sponsor Tier","default":"none"},"image_url":{"type":"string","title":"Image Url","default":""}},"type":"object","required":["name","slug","value","unit","icon","category","familiarity"],"title":"ReferenceResponse"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"},"password":{"type":"string","maxLength":72,"minLength":6,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest"},"ResolvedFactResponse":{"properties":{"entity":{"type":"string","title":"Entity"},"metric":{"type":"string","title":"Metric"},"headline":{"type":"string","title":"Headline"},"display_value":{"type":"number","title":"Display Value"},"display_unit":{"type":"string","title":"Display Unit"},"year":{"type":"string","title":"Year"},"source_url":{"type":"string","title":"Source Url"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["entity","metric","headline","display_value","display_unit","year","source_url","confidence"],"title":"ResolvedFactResponse"},"ScoreBreakdownResponse":{"properties":{"familiarity":{"type":"number","title":"Familiarity"},"semantic_similarity":{"type":"number","title":"Semantic Similarity"},"multiplier_quality":{"type":"number","title":"Multiplier Quality"},"category_bonus":{"type":"number","title":"Category Bonus"},"variance_penalty":{"type":"number","title":"Variance Penalty"},"surprise_bonus":{"type":"number","title":"Surprise Bonus"},"sponsor_boost":{"type":"number","title":"Sponsor Boost","default":0.0},"kind_affinity":{"type":"number","title":"Kind Affinity","default":0.0},"total":{"type":"number","title":"Total"}},"type":"object","required":["familiarity","semantic_similarity","multiplier_quality","category_bonus","variance_penalty","surprise_bonus","total"],"title":"ScoreBreakdownResponse"},"SharePerspectiveItem":{"properties":{"icon":{"type":"string","maxLength":10,"title":"Icon","default":""},"text":{"type":"string","maxLength":600,"title":"Text"},"source_url":{"type":"string","maxLength":500,"title":"Source Url","default":""}},"type":"object","required":["text"],"title":"SharePerspectiveItem","description":"One card of the full set carried by a share-all link."},"ShareRequest":{"properties":{"perspective_text":{"type":"string","maxLength":2000,"title":"Perspective Text"},"strategy":{"type":"string","maxLength":50,"title":"Strategy","default":""},"reference_name":{"type":"string","maxLength":200,"title":"Reference Name","default":""},"reference_icon":{"type":"string","maxLength":10,"title":"Reference Icon","default":""},"input_value":{"type":"number","title":"Input Value"},"input_unit":{"type":"string","maxLength":50,"title":"Input Unit"},"input_dimension":{"type":"string","maxLength":50,"title":"Input Dimension"},"formatted_ratio":{"type":"string","maxLength":100,"title":"Formatted Ratio","default":""},"headline":{"type":"string","maxLength":500,"title":"Headline","default":""},"perspectives":{"items":{"$ref":"#/components/schemas/SharePerspectiveItem"},"type":"array","maxItems":8,"title":"Perspectives"}},"type":"object","required":["perspective_text","input_value","input_unit","input_dimension"],"title":"ShareRequest"},"ShareResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","url"],"title":"ShareResponse"},"SignupRequest":{"properties":{"username":{"type":"string","maxLength":24,"minLength":3,"title":"Username"},"email":{"type":"string","maxLength":120,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":72,"minLength":6,"title":"Password"},"display_name":{"type":"string","maxLength":60,"minLength":1,"title":"Display Name"}},"type":"object","required":["username","email","password","display_name"],"title":"SignupRequest"},"SourceInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"type":{"type":"string","title":"Type"},"license":{"type":"string","title":"License"},"cadence_days":{"type":"integer","title":"Cadence Days"},"source_url_root":{"type":"string","title":"Source Url Root"},"requires_auth":{"type":"boolean","title":"Requires Auth"}},"type":"object","required":["id","name","description","type","license","cadence_days","source_url_root","requires_auth"],"title":"SourceInfo"},"TodayPerspectiveItem":{"properties":{"icon":{"type":"string","maxLength":10,"title":"Icon","default":"💡"},"text":{"type":"string","maxLength":500,"title":"Text"}},"type":"object","required":["text"],"title":"TodayPerspectiveItem"},"TodayPostCreate":{"properties":{"category":{"type":"string","maxLength":30,"title":"Category","default":"general"},"headline":{"type":"string","maxLength":300,"title":"Headline"},"display_number":{"type":"string","maxLength":40,"title":"Display Number","default":""},"input_value":{"type":"number","title":"Input Value"},"input_unit":{"type":"string","maxLength":50,"title":"Input Unit","default":""},"input_dimension":{"type":"string","maxLength":50,"title":"Input Dimension","default":""},"image_url":{"type":"string","maxLength":1000,"title":"Image Url","default":""},"source_name":{"type":"string","maxLength":120,"title":"Source Name","default":""},"source_url":{"type":"string","maxLength":1000,"title":"Source Url","default":""},"perspectives":{"items":{"$ref":"#/components/schemas/TodayPerspectiveItem"},"type":"array","maxItems":6,"title":"Perspectives"}},"type":"object","required":["headline","input_value","perspectives"],"title":"TodayPostCreate"},"UpdateRefRequest":{"properties":{"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dimension"},"display_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Display Value"},"display_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Unit"},"familiarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Familiarity"},"provenance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provenance"}},"type":"object","title":"UpdateRefRequest"},"UpdateUserRequest":{"properties":{"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"}},"type":"object","title":"UpdateUserRequest"},"UpdateVisibilityRequest":{"properties":{"visibility":{"type":"string","enum":["private","public"],"title":"Visibility"}},"type":"object","required":["visibility"],"title":"UpdateVisibilityRequest"},"UserInput":{"properties":{"country":{"type":"string","title":"Country","default":"US"},"age_range":{"type":"string","title":"Age Range","default":""},"profession":{"type":"string","title":"Profession","default":""},"interests":{"items":{"type":"string"},"type":"array","title":"Interests"},"unit_preference":{"type":"string","title":"Unit Preference","default":"imperial"}},"type":"object","title":"UserInput"},"UserProfileResponse":{"properties":{"username":{"type":"string","title":"Username"},"display_name":{"type":"string","title":"Display Name"},"bio":{"type":"string","title":"Bio"},"created_at":{"type":"string","title":"Created At"},"follower_count":{"type":"integer","title":"Follower Count"},"following_count":{"type":"integer","title":"Following Count"},"is_following":{"type":"boolean","title":"Is Following","default":false},"is_self":{"type":"boolean","title":"Is Self","default":false},"entries":{"items":{"$ref":"#/components/schemas/LibraryEntryResponse"},"type":"array","title":"Entries"}},"type":"object","required":["username","display_name","bio","created_at","follower_count","following_count","entries"],"title":"UserProfileResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"}}}}