{"openapi":"3.1.1","info":{"title":"Armin & Artur Story API","version":"1.0.0","description":"Public-domain story text is free. The paid product is the editorial reading-direction JSON: cast, speaker resolution, voice profiles, scenes, directions and rendering guidance."},"servers":[{"url":"https://arminundartur.de"}],"security":[],"paths":{"/api/v1/stories.json":{"get":{"operationId":"listStories","summary":"List published stories and reading availability","responses":{"200":{"description":"Story catalogue"}}}},"/api/v1/stories/{id}.json":{"get":{"operationId":"getPublicStory","summary":"Get public-domain original story text without editorial direction","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}],"responses":{"200":{"description":"Public story","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStory"}}}},"404":{"description":"Story not found"}}}},"/api/v1/story-reading.schema.json":{"get":{"operationId":"getReadingSchema","summary":"Get the canonical reading-direction JSON Schema","responses":{"200":{"description":"JSON Schema","content":{"application/schema+json":{"schema":{"type":"object"}}}}}}},"/api/v1/stories/{id}/reading.json":{"get":{"operationId":"buyStoryReading","summary":"Buy the canonical reading-direction JSON with x402 v2","description":"This deployment advertises USDC on mainnet (eip155:8453), amount 10000 atomic units with 6 decimals. Validate these values against the catalogue and the actual 402 challenge before signing. Missing or invalid payment configuration fails closed with 503.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"Base64-encoded x402 v2 payment payload."}],"responses":{"200":{"description":"Paid editorial reading-direction artefact","headers":{"PAYMENT-RESPONSE":{"required":true,"schema":{"type":"string"},"description":"Base64-encoded x402 settlement response."}},"content":{"application/json":{"schema":{"$ref":"https://arminundartur.de/api/v1/story-reading.schema.json"}}}},"402":{"description":"x402 payment required","headers":{"PAYMENT-REQUIRED":{"required":true,"schema":{"type":"string"},"description":"Base64-encoded x402 v2 PaymentRequired JSON."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"503":{"description":"Payments are disabled, misconfigured, or facilitator is unavailable; no artefact is returned."}}}}},"components":{"schemas":{"PublicStory":{"type":"object","required":["id","title","language","sourceUrl","originalText"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"textPolicy":{"type":"string"},"originalText":{"type":"object","required":["format","source","paragraphs"],"properties":{"format":{"type":"string"},"source":{"type":"string"},"paragraphs":{"type":"array","items":{"type":"string"}}}}}},"PaymentRequired":{"type":"object","required":["x402Version","resource","accepts"],"properties":{"x402Version":{"const":2},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}}