{"openapi":"3.1.0","info":{"title":"x402 Content Classifier","description":"Classify text or JSON into a category using Claude AI. POST /v1/classify requires x402 USDC micropayment ($0.005). POST /v1/classify/trial is free — sentiment/topic only, 4KB limit.","version":"0.1.1"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}},"head":{"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/stats":{"get":{"summary":"Call counts for this session","operationId":"stats_v1_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Stats V1 Stats Get"}}}}}}},"/v1/classify":{"post":{"summary":"Classify Paid","operationId":"classify_paid_v1_classify_post","parameters":[{"name":"X-Payment-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Payment-Token"}},{"name":"X-PAYMENT","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Payment"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/classify/trial":{"post":{"summary":"Trial — no payment required","description":"Free trial endpoint. No x402 payment required. Presets: sentiment and topic only. Input limit: 4KB. Multi-label: always disabled. Use POST /v1/classify for full access.","operationId":"classify_trial_v1_classify_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ClassifyMeta":{"properties":{"preset":{"type":"string","title":"Preset"},"multi_label":{"type":"boolean","title":"Multi Label"},"input_type":{"type":"string","title":"Input Type"},"model":{"type":"string","title":"Model"},"input_length":{"type":"integer","title":"Input Length"}},"type":"object","required":["preset","multi_label","input_type","model","input_length"],"title":"ClassifyMeta"},"ClassifyRequest":{"properties":{"input":{"type":"string","title":"Input","description":"Text or JSON string to classify"},"input_type":{"$ref":"#/components/schemas/InputType","description":"Input type: text or json","default":"text"},"preset":{"$ref":"#/components/schemas/Preset","description":"Classification taxonomy preset","default":"sentiment"},"taxonomy":{"items":{"type":"string"},"type":"array","title":"Taxonomy","description":"Custom labels (required when preset=custom, 2–20 labels)"},"multi_label":{"type":"boolean","title":"Multi Label","description":"Return ranked list of all labels","default":false},"explain":{"type":"boolean","title":"Explain","description":"Include reasoning string in response","default":true}},"type":"object","required":["input"],"title":"ClassifyRequest"},"ClassifyResponse":{"properties":{"label":{"type":"string","title":"Label"},"confidence":{"type":"number","title":"Confidence"},"labels":{"items":{"$ref":"#/components/schemas/LabelScore"},"type":"array","title":"Labels"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"meta":{"$ref":"#/components/schemas/ClassifyMeta"}},"type":"object","required":["label","confidence","labels","meta"],"title":"ClassifyResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"service":{"type":"string","title":"Service"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","service","version"],"title":"HealthResponse"},"InputType":{"type":"string","enum":["text","json"],"title":"InputType"},"LabelScore":{"properties":{"label":{"type":"string","title":"Label"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["label","confidence"],"title":"LabelScore"},"Preset":{"type":"string","enum":["sentiment","topic","intent","urgency","custom"],"title":"Preset"},"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"}}}}