{"openapi":"3.1.0","info":{"title":"FounderKit API","version":"0.1.0"},"paths":{"/api/analytics/event":{"post":{"summary":"Analytics Event","description":"Accept a small, anonymous allow-listed product event.","operationId":"analytics_event_api_analytics_event_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/data":{"get":{"summary":"Get All Data","description":"Return existing cached or stored source data without waiting for collection.\n\nlang=zh prefers stored Chinese translations; untranslated fields retain the\noriginal text. HF Papers filtering uses daily submitted_at, not publication date.\nApplication limit: 10 requests/minute per client IP; proxies may be stricter.","operationId":"get_all_data_api_data_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hours"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/refresh":{"get":{"summary":"Refresh","description":"Manually trigger a refresh. Returns immediately; client gets update via /api/events.","operationId":"refresh_api_refresh_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/events":{"get":{"summary":"Sse Events","description":"SSE stream — pushes {type: 'data_updated'} when cache refreshes.","operationId":"sse_events_api_events_get","responses":{"200":{"description":"SSE data events separated by blank lines. Inspect error events as well as HTTP status.","content":{"text/event-stream":{"schema":{"type":"string"}}}}}}},"/api/status":{"get":{"summary":"Status","description":"Report client initialization state and cache/database statistics.\n\navailable=true is not a live health, authentication, balance or quota check.\nIt can remain true when a provider rejects requests for insufficient balance.","operationId":"status_api_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/history/tweets":{"get":{"summary":"History Tweets","description":"Return stored raw tweets, newest fetched_at first; optional handle excludes @.\n\nlimit defaults to 50. This is not a history of generated daily digests and\ndoes not apply Chinese translations. Application limit: 10 requests/minute.","operationId":"history_tweets_api_history_tweets_get","parameters":[{"name":"handle","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/history/fetch-log":{"get":{"summary":"History Fetch Log","description":"Return collection logs, newest fetched_at first; limit defaults to 100.\n\nA tweets status of stale means the newest returned tweet is older than\n72 hours or the batch is empty, not necessarily a failed request.\nApplication limit: 10 requests/minute.","operationId":"history_fetch_log_api_history_fetch_log_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/db/prune":{"get":{"summary":"Prune Db","operationId":"prune_db_api_db_prune_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/digest":{"get":{"summary":"Digest Cached","description":"Query valid caches as JSON, or return/generate a complete Markdown digest.\n\nJSON never starts generation: a cache miss returns text=\"\", cached=false,\ndate=null. format=markdown starts generation if no valid cache exists.\nNormal cache TTL is 30 minutes; fallback TTL is 5 minutes. date is the UTC\ngeneration date, not a source publication date. Application limit: 20/minute.","operationId":"digest_cached_api_digest_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"zh","title":"Lang"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Digest JSON exposes text, cached, UTC date and reliability flags. Markdown contains only a date and body; use JSON to inspect stale/fallback/warning/error.","content":{"application/json":{"schema":{"type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"429":{"description":"Request rate limit exceeded; back off before retrying."},"503":{"description":"Neither generation nor an acceptable fallback result is available."},"504":{"description":"Generation timed out without an acceptable cached result.","content":{"application/json":{"schema":{"type":"object"}},"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/digest/once":{"get":{"summary":"Digest Once","description":"Return the complete digest as JSON or Markdown, generating on cache miss.\n\nlang is zh or en; format is json or markdown. Concurrent requests for the\nsame language share generation. Waits up to about 115 seconds, then may\nreturn stale data or a source-data fallback. Markdown adds a UTC date line\nbefore the same body as JSON text. Application limit: 5 requests/minute.","operationId":"digest_once_api_digest_once_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"zh","title":"Lang"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Digest JSON exposes text, cached, UTC date and reliability flags. Markdown contains only a date and body; use JSON to inspect stale/fallback/warning/error.","content":{"application/json":{"schema":{"type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"429":{"description":"Request rate limit exceeded; back off before retrying."},"503":{"description":"Neither generation nor an acceptable fallback result is available."},"504":{"description":"Generation timed out without an acceptable cached result.","content":{"application/json":{"schema":{"type":"object"}},"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/digest/stream":{"get":{"summary":"Digest Stream","description":"Send the complete, source-normalized digest in chunk/done SSE events.\n\nGeneration finishes before chunks are published; this is not a live token\nstream. Cached digests are replayed in chunks. Concatenated chunks match\none-shot JSON text for shared valid results, without an extra date line.\nUses the same cache, generation and fallback path as the one-shot endpoint.\ndone includes the UTC generation date and cached/shared/stale/fallback flags\nwhen applicable. Handle error events. Application limit: 5 requests/minute.","operationId":"digest_stream_api_digest_stream_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"zh","title":"Lang"}}],"responses":{"200":{"description":"SSE data events separated by blank lines. Inspect error events as well as HTTP status.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/skill.md":{"get":{"summary":"Skill Doc","operationId":"skill_doc_skill_md_get","responses":{"200":{"description":"Successful Response","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}