{"openapi": "3.1.0", "info": {"title": "Batch-Anything Streaming Bulk Table Waterfall API", "version": "1.0.0", "description": "Headless streaming bulk table enrichment API & native MCP server (100 to 100,000+ rows). Pay strictly per verified non-empty row ($0 on empty/fake-200/422/timeout rows), cross-tenant 7d-30d adaptive archive cache (10% same-tenant repeat discount), 0% BYOK markup, hard budget caps with signed resume tokens, and Zero Customer Table Resale guarantee."}, "servers": [{"url": "https://batch.fastmesh.dev", "description": "Production HTTPS Gateway"}, {"url": "http://127.0.0.1:8926", "description": "Local Engine"}], "paths": {"/health": {"get": {"operationId": "getHealth", "summary": "Service health, supported table formats, and archive cache telemetry", "responses": {"200": {"description": "Healthy"}}}}, "/openapi.json": {"get": {"operationId": "getOpenApiSpec", "summary": "OpenAPI 3.1 JSON schema", "responses": {"200": {"description": "OpenAPI document"}}}}, "/v1/workflows": {"get": {"operationId": "listWorkflows", "summary": "List built-in public enrichment workflows, unit prices, and TTL classes", "responses": {"200": {"description": "Workflow catalog"}}}}, "/v1/batch/quote": {"post": {"operationId": "quoteBatch", "summary": "Zero-cost pre-flight quote estimating cache hits, live calls, and max cost", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Pre-flight batch quote"}}}}, "/v1/batch/run": {"post": {"operationId": "runBatchSync", "summary": "Run synchronous bulk table waterfall enrichment (CSV/TSV/JSON/JSONL/rows)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Completed or budget-paused batch summary & rows"}}}}, "/v1/batch/submit": {"post": {"operationId": "submitBatchAsync", "summary": "Submit asynchronous streaming bulk enrichment job (HTTP 202 + job_id)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"202": {"description": "Accepted async batch job"}}}}, "/v1/batch/{job_id}": {"get": {"operationId": "getBatchJobStatus", "summary": "Inspect live batch progress, cache_hit_rate, savings, dead-letter preview & resume_token", "parameters": [{"name": "job_id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Batch job status"}, "404": {"description": "Not found"}}}}, "/v1/batch/{job_id}/resume": {"post": {"operationId": "resumeBatchJob", "summary": "Resume a budget-paused job using signed resume_token and increased budget with 0 duplicate charges", "parameters": [{"name": "job_id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Sync resumed"}, "202": {"description": "Async resume started"}}}}, "/v1/batch/{job_id}/export": {"get": {"operationId": "exportBatchJob", "summary": "Download enriched table or dead_letter audit in csv, tsv, jsonl, json, sqlite, or columnar format", "parameters": [{"name": "job_id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "format", "in": "query", "required": false, "schema": {"type": "string", "enum": ["csv", "tsv", "json", "jsonl", "sqlite", "columnar"], "default": "csv"}}, {"name": "include", "in": "query", "required": false, "schema": {"type": "string", "enum": ["enriched", "dead_letter"], "default": "enriched"}}], "responses": {"200": {"description": "Exported table stream"}}}}, "/v1/byok/keys": {"post": {"operationId": "storeByokKey", "summary": "Write-only encrypted BYOK API key storage (0% markup, never echoed)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Stored key metadata fingerprint"}}}, "get": {"operationId": "listByokKeys", "summary": "List write-only BYOK key metadata fingerprints for a tenant", "parameters": [{"name": "tenant_id", "in": "query", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Key metadata list"}}}}, "/v1/wallet/{tenant_id}": {"get": {"operationId": "getTenantWallet", "summary": "Query never-expiring tenant prepaid credit balance", "parameters": [{"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Tenant wallet balance"}}}}, "/webhooks/creem": {"post": {"operationId": "handleCreemWebhook", "summary": "Creem HMAC-SHA256 webhook receiver with idempotent never-expiring tenant credit grant", "responses": {"200": {"description": "Processed"}, "401": {"description": "Invalid signature"}}}}, "/mcp": {"post": {"operationId": "handleMcpJsonRpc", "summary": "Native JSON-RPC 2.0 MCP server (initialize, notifications/initialized, tools/list, tools/call)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "JSON-RPC 2.0 response"}}}}}}