API REFERENCE
Meta Lab API
Check /api/health for deployment mode. Local writes require JSON; public hosting can disable every write route.
| METHOD | ENDPOINT | OPERATION |
|---|---|---|
| GET | /api/health | Health |
| GET | /api/stats | Stats |
| GET | /api/tokens | Tokens |
| GET | /api/token/{token_id} | Token |
| GET | /api/metas | Metas |
| GET | /api/search | Search |
| POST | /api/research | Report |
| POST | /api/collect | Collect |
| POST | /api/label | Label |
| POST | /api/import | Import Data |
| POST | /api/cluster | Cluster |
| POST | /api/train | Train |
| POST | /api/ideas | Generate Ideas |
| GET | /api/ideas | Idea Reports |
| GET | /api/ideas/export/{report_id}.md | Idea Markdown |
| GET | /api/ideas/export/{report_id}.json | Idea Json |
| GET | /api/ideas/{report_id} | Idea Report |
| GET | /api/export | Export |
Complete schemas
{"components": {"schemas": {"Collect": {"properties": {"addresses": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Addresses"}, "chain": {"default": "solana", "pattern": "^[a-z0-9-]+$", "title": "Chain", "type": "string"}, "limit": {"default": 15, "maximum": 100.0, "minimum": 1.0, "title": "Limit", "type": "integer"}}, "title": "Collect", "type": "object"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "title": "Detail", "type": "array"}}, "title": "HTTPValidationError", "type": "object"}, "IdeaRequest": {"properties": {"as_of": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Of"}, "candidate_count": {"default": 6, "maximum": 10.0, "minimum": 1.0, "title": "Candidate Count", "type": "integer"}, "category": {"default": "all", "pattern": "^(meme|product|all)$", "title": "Category", "type": "string"}, "comparison_days": {"default": 90, "maximum": 10000.0, "minimum": 2.0, "title": "Comparison Days", "type": "integer"}, "method": {"default": "local", "pattern": "^(local|llm)$", "title": "Method", "type": "string"}, "recent_days": {"default": 7, "maximum": 3650.0, "minimum": 1.0, "title": "Recent Days", "type": "integer"}}, "title": "IdeaRequest", "type": "object"}, "ImportRequest": {"properties": {"records": {"items": {"additionalProperties": true, "type": "object"}, "maxItems": 10000, "title": "Records", "type": "array"}}, "required": ["records"], "title": "ImportRequest", "type": "object"}, "LabelRequest": {"properties": {"limit": {"default": 500, "maximum": 10000.0, "minimum": 1.0, "title": "Limit", "type": "integer"}, "method": {"default": "rules", "title": "Method", "type": "string"}}, "title": "LabelRequest", "type": "object"}, "Query": {"properties": {"as_of": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Of"}, "llm": {"default": false, "title": "Llm", "type": "boolean"}, "query": {"maxLength": 1000, "minLength": 1, "title": "Query", "type": "string"}}, "required": ["query"], "title": "Query", "type": "object"}, "ValidationError": {"properties": {"ctx": {"title": "Context", "type": "object"}, "input": {"title": "Input"}, "loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "title": "Location", "type": "array"}, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}}, "required": ["loc", "msg", "type"], "title": "ValidationError", "type": "object"}}}, "info": {"description": "Local research MVP. Not a complete market index or validated investment predictor.", "title": "Meta Lab API", "version": "0.2.0"}, "openapi": "3.1.0", "paths": {"/api/cluster": {"post": {"operationId": "cluster_api_cluster_post", "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}}, "summary": "Cluster"}}, "/api/collect": {"post": {"operationId": "collect_api_collect_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Collect"}}}, "required": true}, "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Collect"}}, "/api/export": {"get": {"operationId": "export_api_export_get", "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}}, "summary": "Export"}}, "/api/health": {"get": {"operationId": "health_api_health_get", "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}}, "summary": "Health"}}, "/api/ideas": {"get": {"operationId": "idea_reports_api_ideas_get", "parameters": [{"in": "query", "name": "limit", "required": false, "schema": {"default": 20, "title": "Limit", "type": "integer"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Idea Reports"}, "post": {"operationId": "generate_ideas_api_ideas_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/IdeaRequest"}}}, "required": true}, "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Generate Ideas"}}, "/api/ideas/export/{report_id}.json": {"get": {"operationId": "idea_json_api_ideas_export__report_id__json_get", "parameters": [{"in": "path", "name": "report_id", "required": true, "schema": {"title": "Report Id", "type": "string"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Idea Json"}}, "/api/ideas/export/{report_id}.md": {"get": {"operationId": "idea_markdown_api_ideas_export__report_id__md_get", "parameters": [{"in": "path", "name": "report_id", "required": true, "schema": {"title": "Report Id", "type": "string"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Idea Markdown"}}, "/api/ideas/{report_id}": {"get": {"operationId": "idea_report_api_ideas__report_id__get", "parameters": [{"in": "path", "name": "report_id", "required": true, "schema": {"title": "Report Id", "type": "string"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Idea Report"}}, "/api/import": {"post": {"operationId": "import_data_api_import_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImportRequest"}}}, "required": true}, "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Import Data"}}, "/api/label": {"post": {"operationId": "label_api_label_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LabelRequest"}}}, "required": true}, "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Label"}}, "/api/metas": {"get": {"operationId": "metas_api_metas_get", "parameters": [{"in": "query", "name": "as_of", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Of"}}, {"in": "query", "name": "days", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Days"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Metas"}}, "/api/research": {"post": {"operationId": "report_api_research_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Query"}}}, "required": true}, "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Report"}}, "/api/search": {"get": {"operationId": "search_api_search_get", "parameters": [{"in": "query", "name": "q", "required": true, "schema": {"title": "Q", "type": "string"}}, {"in": "query", "name": "days", "required": false, "schema": {"default": 90, "title": "Days", "type": "integer"}}, {"in": "query", "name": "k", "required": false, "schema": {"default": 8, "title": "K", "type": "integer"}}, {"in": "query", "name": "as_of", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Of"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Search"}}, "/api/stats": {"get": {"operationId": "stats_api_stats_get", "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}}, "summary": "Stats"}}, "/api/token/{token_id}": {"get": {"operationId": "token_api_token__token_id__get", "parameters": [{"in": "path", "name": "token_id", "required": true, "schema": {"title": "Token Id", "type": "string"}}, {"in": "query", "name": "as_of", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Of"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Token"}}, "/api/tokens": {"get": {"operationId": "tokens_api_tokens_get", "parameters": [{"in": "query", "name": "q", "required": false, "schema": {"default": "", "title": "Q", "type": "string"}}, {"in": "query", "name": "meta", "required": false, "schema": {"default": "", "title": "Meta", "type": "string"}}, {"in": "query", "name": "limit", "required": false, "schema": {"default": 100, "title": "Limit", "type": "integer"}}, {"in": "query", "name": "offset", "required": false, "schema": {"default": 0, "title": "Offset", "type": "integer"}}, {"in": "query", "name": "as_of", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "As Of"}}], "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}, "422": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}, "description": "Validation Error"}}, "summary": "Tokens"}}, "/api/train": {"post": {"operationId": "train_api_train_post", "responses": {"200": {"content": {"application/json": {"schema": {}}}, "description": "Successful Response"}}, "summary": "Train"}}}}