{"openapi":"3.1.0","info":{"title":"IndieML Substance API","description":"A lightweight tool that evaluates text for substance, depth, and clarity.","version":"1.0.0"},"paths":{"/v1/score/substance":{"post":{"summary":"Score Text","operationId":"score_text_v1_score_substance_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"meter","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Meter"}},{"name":"amount","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Amount"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/score/substance/batch":{"post":{"summary":"Score Text Batch","operationId":"score_text_batch_v1_score_substance_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/score/demo":{"post":{"summary":"Score Demo","operationId":"score_demo_v1_score_demo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/generate":{"post":{"summary":"Generate Key","operationId":"generate_key_v1_keys_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"KeyRequest"},"ScoreBatchRequest":{"properties":{"input_texts":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Input Texts","description":"Array of strings to score. Maximum 100 items per request."}},"type":"object","required":["input_texts"],"title":"ScoreBatchRequest"},"ScoreBatchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ScoreResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"ScoreBatchResponse"},"ScoreRequest":{"properties":{"input_text":{"type":"string","maxLength":1000,"title":"Input Text"}},"type":"object","required":["input_text"],"title":"ScoreRequest"},"ScoreResponse":{"properties":{"result":{"$ref":"#/components/schemas/ScoreResult"}},"type":"object","required":["result"],"title":"ScoreResponse"},"ScoreResult":{"properties":{"text":{"type":"string","title":"Text"},"substance_score":{"type":"number","title":"Substance Score"}},"type":"object","required":["text","substance_score"],"title":"ScoreResult"},"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"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}