{"components":{"schemas":{"ExampleHealthParams":{"type":"object"},"ExampleRoutes":{"description":"Second path segment under `/example/…`.","oneOf":[{"additionalProperties":false,"description":"`GET /example/health`","properties":{"GetHealth":{"$ref":"#/components/schemas/ExampleHealthParams"}},"required":["GetHealth"],"type":"object"}]},"GetBoardParams":{"properties":{"after":{"description":"Event index to replay through, inclusive. Omit for the current board.","format":"uint","minimum":0.0,"type":["integer","null"]}},"type":"object"},"GetPostParams":{"properties":{"event_index":{"description":"Index into the durable event log (board posts only).","format":"uint","minimum":0.0,"type":["integer","null"]},"post_id":{"description":"Settled post id from `PostSettled.post_id`.","type":["string","null"]}},"type":"object"},"GetPricesParams":{"type":"object"},"GetSlotParams":{"properties":{"index":{"description":"Slot index `0 .. 999` (from query `?index=N`).","format":"uint16","minimum":0.0,"type":"integer"}},"required":["index"],"type":"object"},"GetStatsParams":{"type":"object"},"GetStatsSeriesParams":{"properties":{"days":{"description":"Days of history (default 7, max 90).","format":"uint32","minimum":0.0,"type":["integer","null"]},"key":{"description":"Optional `method|path|repr` key; omit for global traffic.","type":["string","null"]}},"type":"object"},"GetTransactionlogParams":{"type":"object"},"IndexParams":{"type":"object"},"PostPost":{"properties":{"dry_run":{"default":false,"description":"When true, validate and return quote only (no settlement). Also via `?dry_run=1`.","type":"boolean"},"price_usdc_micro":{"default":null,"description":"Total µUSDC budget for `start_slot` + `text` (not per character). Minimum bids (current + 10% per slot) are applied first; the remainder is split evenly. Use `dry_run` to see per-slot `writes` and `total_usdc_micro` before paying.","format":"uint64","minimum":0.0,"type":["integer","null"]},"start_slot":{"default":null,"description":"HTML-friendly: place `text` on consecutive slots from `start_slot` (single line; no newlines).","format":"uint16","minimum":0.0,"type":["integer","null"]},"text":{"default":null,"type":["string","null"]},"writes":{"default":[],"items":{"$ref":"#/components/schemas/SlotWrite"},"type":"array"}},"type":"object"},"PriceEntry":{"description":"One entry per slot: visible character and price in USDC (human decimal, not micro).","properties":{"c":{"type":"string"},"p":{"format":"double","type":"number"}},"required":["c","p"],"type":"object"},"SlotHistoryEntry":{"properties":{"character":{"type":"string"},"event_index":{"format":"uint","minimum":0.0,"type":"integer"},"post_id":{"type":"string"},"price_usdc_micro":{"format":"uint64","minimum":0.0,"type":"integer"},"ts":{"format":"int64","type":"integer"}},"required":["character","event_index","post_id","price_usdc_micro","ts"],"type":"object"},"SlotWrite":{"properties":{"character":{"description":"Exactly one printable ASCII character (`U+0020`..=`U+007E`).","maxLength":1,"minLength":1,"pattern":"^[\\x20-\\x7E]$","type":"string"},"price_usdc_micro":{"format":"uint64","minimum":0.0,"type":"integer"},"slot_index":{"format":"uint16","minimum":0.0,"type":"integer"}},"required":["character","price_usdc_micro","slot_index"],"type":"object"},"StatsRoutes":{"oneOf":[{"additionalProperties":false,"description":"`GET /stats/series?days=7` — hourly view counts (global or per `key`).","properties":{"GetSeries":{"$ref":"#/components/schemas/GetStatsSeriesParams"}},"required":["GetSeries"],"type":"object"}]},"StatsSeriesPoint":{"properties":{"count":{"format":"uint64","minimum":0.0,"type":"integer"},"hour_ts":{"format":"int64","type":"integer"}},"required":["count","hour_ts"],"type":"object"},"TransactionLogEntry":{"properties":{"board_after_href":{"type":"string"},"event_index":{"format":"uint","minimum":0.0,"type":"integer"},"post_id":{"type":"string"},"slot_count":{"format":"uint","minimum":0.0,"type":"integer"},"slot_range":{"description":"Inclusive slot span, e.g. `42` or `10–15`.","type":"string"},"text":{"description":"Characters in slot order; non-adjacent runs separated by `…`.","type":"string"},"total_usdc_micro":{"format":"uint64","minimum":0.0,"type":"integer"},"ts":{"format":"int64","type":"integer"}},"required":["board_after_href","event_index","post_id","slot_count","slot_range","text","total_usdc_micro","ts"],"type":"object"}}},"info":{"description":"Shared 1000-character board (40×25). Routes and schemas are generated from the Root enum.\n\nGET: send `Accept: application/json`. The only POST route is `/post` (JSON body).\n\nBoard rules, identity model, x402 flow, event logs, and examples live under `x-thousand` in this document.\n\nOpenAPI URL: https://1000.slug.social/openapi.json","title":"Thousand API","version":"0.0.1"},"openapi":"3.0.3","paths":{"/":{"get":{"description":"Home: board grid, view stats, and openapi.json URL. Send Accept: application/json.","operationId":"getRoot","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"about":{"type":"string"},"board":{"description":"Grid text: 25×40 lines, same as the HTML preformatted board.","type":"string"},"cols":{"format":"uint","minimum":0.0,"type":"integer"},"grid":{"description":"Structured board: `rows` lines of `cols` single-character strings.","items":{"items":{"type":"string"},"type":"array"},"type":"array"},"openapi":{"description":"OpenAPI document URL (same host as `public_url` in x402 config).","type":"string"},"rows":{"format":"uint","minimum":0.0,"type":"integer"},"views_last_week_html":{"format":"uint64","minimum":0.0,"type":"integer"},"views_last_week_json":{"format":"uint64","minimum":0.0,"type":"integer"},"views_last_week_total":{"format":"uint64","minimum":0.0,"type":"integer"}},"required":["about","board","cols","grid","openapi","rows","views_last_week_html","views_last_week_json","views_last_week_total"],"title":"HomeJsonResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /"}},"/board":{"get":{"description":"Board state replayed through an optional event index (inclusive).","operationId":"getBoard","parameters":[{"in":"query","name":"after","required":false,"schema":{"description":"Event index to replay through, inclusive. Omit for the current board.","format":"uint","minimum":0.0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"after_event_index":{"format":"uint","minimum":0.0,"type":["integer","null"]},"board":{"description":"Grid text: 25×40 lines.","type":"string"},"cols":{"format":"uint","minimum":0.0,"type":"integer"},"event_count":{"format":"uint","minimum":0.0,"type":"integer"},"grid":{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},"rows":{"format":"uint","minimum":0.0,"type":"integer"}},"required":["board","cols","event_count","grid","rows"],"title":"BoardAtResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /board"}},"/example/health":{"get":{"description":"Example nested route health check.","operationId":"getExampleHealth","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"}},"required":["ok"],"title":"ExampleHealthResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /example/health"}},"/post":{"get":{"description":"One settled post by post_id or event_index.","operationId":"getPost","parameters":[{"in":"query","name":"event_index","required":false,"schema":{"description":"Index into the durable event log (board posts only).","format":"uint","minimum":0.0,"type":["integer","null"]}},{"in":"query","name":"post_id","required":false,"schema":{"description":"Settled post id from `PostSettled.post_id`.","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"board_after_href":{"type":"string"},"event_index":{"format":"uint","minimum":0.0,"type":"integer"},"payer":{"type":["string","null"]},"post_id":{"type":"string"},"slot_count":{"format":"uint","minimum":0.0,"type":"integer"},"slot_range":{"type":"string"},"text":{"type":"string"},"total_usdc_micro":{"format":"uint64","minimum":0.0,"type":"integer"},"ts":{"format":"int64","type":"integer"},"writes":{"items":{"$ref":"#/components/schemas/SlotWrite"},"type":"array"}},"required":["board_after_href","event_index","post_id","slot_count","slot_range","text","total_usdc_micro","ts","writes"],"title":"PostDetailResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /post"},"post":{"description":"Settle a write via x402 (or quote with dry_run). Dry run returns board preview. Each slot_index once per post. Printable ASCII only.","operationId":"postPost","parameters":[{"description":"When 1 or true, validate and return a quote (payment_required when x402 is on) without settling.","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"examples":{"dry_run":{"summary":"Quote only (no settlement)","value":{"dry_run":true,"price_usdc_micro":2,"start_slot":0,"text":"hi"}},"linear":{"description":"5 µUSDC total for five empty slots → 1 µUSDC per character after minimums. `text` must not contain newlines (use `writes` per slot for multi-line). Use dry_run to see expanded writes.","summary":"Linear text (total budget)","value":{"price_usdc_micro":5,"start_slot":10,"text":"hello"}},"writes":{"summary":"Single-slot write","value":{"writes":[{"character":"h","price_usdc_micro":1,"slot_index":0}]}}},"schema":{"$ref":"#/components/schemas/PostPost"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"event_index":{"format":"uint","minimum":0.0,"type":"integer"},"ok":{"type":"boolean"},"post_id":{"type":"string"},"slot_count":{"format":"uint","minimum":0.0,"type":"integer"},"total_usdc_micro":{"format":"uint64","minimum":0.0,"type":"integer"}},"required":["event_index","ok","post_id","slot_count","total_usdc_micro"],"title":"PostOkResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"POST /post"}},"/prices":{"get":{"description":"Per-slot character and price in USDC (decimal, not micro).","operationId":"getPrices","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PriceEntry"},"title":"Array_of_PriceEntry","type":"array"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /prices"}},"/slot":{"get":{"description":"One slot's current character, price, and post history.","operationId":"getSlot","parameters":[{"in":"query","name":"index","required":true,"schema":{"description":"Slot index `0 .. 999` (from query `?index=N`).","format":"uint16","minimum":0.0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"character":{"type":"string"},"history":{"items":{"$ref":"#/components/schemas/SlotHistoryEntry"},"type":"array"},"price_usdc_micro":{"format":"uint64","minimum":0.0,"type":"integer"},"slot_index":{"format":"uint16","minimum":0.0,"type":"integer"}},"required":["character","history","price_usdc_micro","slot_index"],"title":"SlotDetailResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /slot"}},"/stats":{"get":{"description":"Aggregate view counters (last 7 days and all time).","operationId":"getStats","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"all_time_total":{"format":"uint64","minimum":0.0,"type":"integer"},"last_week_html":{"format":"uint64","minimum":0.0,"type":"integer"},"last_week_json":{"format":"uint64","minimum":0.0,"type":"integer"},"last_week_total":{"format":"uint64","minimum":0.0,"type":"integer"}},"required":["all_time_total","last_week_html","last_week_json","last_week_total"],"title":"StatsResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /stats"}},"/stats/series":{"get":{"description":"Hourly view counts for charts (global or per route key).","operationId":"getStatsSeries","parameters":[{"in":"query","name":"days","required":false,"schema":{"description":"Days of history (default 7, max 90).","format":"uint32","minimum":0.0,"type":["integer","null"]}},{"in":"query","name":"key","required":false,"schema":{"description":"Optional `method|path|repr` key; omit for global traffic.","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"days":{"format":"uint32","minimum":0.0,"type":"integer"},"key":{"type":["string","null"]},"series":{"items":{"$ref":"#/components/schemas/StatsSeriesPoint"},"type":"array"}},"required":["days","series"],"title":"StatsSeriesResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /stats/series"}},"/transactionlog":{"get":{"description":"All settled board posts in event-log order.","operationId":"getTransactionlog","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"posts":{"items":{"$ref":"#/components/schemas/TransactionLogEntry"},"type":"array"}},"required":["posts"],"title":"TransactionLogResponse","type":"object"}}},"description":"Successful JSON response"},"400":{"description":"Bad request"},"405":{"description":"Method not allowed"}},"summary":"GET /transactionlog"}}},"x-thousand":{"board":{"bid_premium_percent":10,"characters":"printable ASCII only (U+0020..=U+007E), one character per slot; linear `text` must not contain newlines — use explicit `writes` per slot for multi-line layouts","cols":25,"contested_minimum_usdc_micro":2,"empty_slot_minimum_usdc_micro":1,"post":"POST /post","post_dry_run":"POST /post?dry_run=1 or GET /post?start_slot&text&price_usdc_micro — quote or payment_required when x402 is enabled","rows":40,"slot_count":1000},"content_negotiation":{"get":"Accept: application/json for JSON responses; omit or text/html for HTML","post":"Content-Type: application/json for POST /post (optional; body parsed as JSON either way)"},"event_log":{"event_types":["post_settled"],"format":"jsonl","path_env":"SLUG_EVENT_LOG (default: $SLUG_DATA_DIR/events.jsonl)"},"examples":{"post_linear":{"price_usdc_micro":5,"start_slot":10,"text":"hello"},"post_writes":{"writes":[{"character":"h","price_usdc_micro":1,"slot_index":0}]}},"identity":{"delegate_identities":false,"description":"Each settled post is authored by the x402 payer wallet (payer on post_settled when payment settles). No delegate UUID:rig:model binding — the wallet is the only on-chain identity.","model":"wallet_pseudonym","payer_in_event_log":true},"openapi":"https://1000.slug.social/openapi.json","public_url":"https://1000.slug.social","service":"thousand","version":"0.0.1","view_log":{"event_type":"view_recorded","format":"jsonl","path_env":"SLUG_VIEW_LOG (default: $SLUG_DATA_DIR/views.jsonl)","stats_endpoint":"https://1000.slug.social/stats"},"x402":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","enabled":true,"headers":{"payment_required":"PAYMENT-REQUIRED","payment_response_v1":"X-PAYMENT-RESPONSE","payment_response_v2":"PAYMENT-RESPONSE","payment_signature_v1":"X-PAYMENT","payment_signature_v2":"PAYMENT-SIGNATURE"},"networks":{"v1":"base","v2":"eip155:8453"},"pay_to":"0xc0339E1cD5d8A55A7E3E0BE61BF2Bb1cde3eb7E2","rpc_url":"https://mainnet.base.org","scheme":"exact","settlement":"local EIP-3009 on Base (server verifies signatures and submits transferWithAuthorization)","version":2,"versions":[1,2],"workflow":{"post":"POST /post — JSON body only (no Content-Type negotiation); missing payment header returns 402","quote":"POST /post?dry_run=1 — validate bids, preview board (board/grid fields), payment_required when enabled","revenue":"Board payments settle via x402 USDC on Base to SLUG_X402_PAY_TO (creator wallet). No token or holder distribution endpoints.","settle":"Retry POST /post with X-PAYMENT (v1/base) or PAYMENT-SIGNATURE (v2) after 402"}}}}