{"openapi":"3.1.0","info":{"title":"Content Generation Service","description":"Service for generating content using various AI models","version":"1.0.0"},"servers":[{"url":"/api/ds-prototypes/content_generation"}],"paths":{"/chat/completions":{"post":{"summary":"Chat Completions","description":"Handle chat completions with word counting and provider routing","operationId":"chat_completions_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"description":"Forbidden – unknown model, missing permission, or provider blocked for this workspace"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"CompletionRequest":{"properties":{"messages":{"items":{"type":"object"},"type":"array","title":"Messages","description":"List of messages with 'role' and 'content'"},"model":{"type":"string","title":"Model","description":"Name of the model","example":"gpt-4.1","option_type":"param"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Temperature of the model","example":0.7,"option_type":"param"},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0},{"type":"null"}],"title":"Max Tokens","description":"Limit the number of tokens to generate","example":1000,"gte":0,"option_type":"param"},"reasoning":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Reasoning","description":"Parameters for the reasoning mode","example":{"effort":"minimal"},"option_type":"param"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Level of the reasoning mode","example":"minimal","option_type":"param"},"tools":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tools","description":"For tools & function calling","option_type":"param"},"tool_choice":{"anyOf":[{"type":"object"},{"type":"string"},{"type":"null"}],"title":"Tool Choice","description":"Influence tool selection","option_type":"param"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed","example":123,"option_type":"param"},"response_format":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Response Format","description":"Used for structured outputs to define a JSON schema","option_type":"param"},"web_search_options":{"anyOf":[{},{"type":"null"}],"title":"Web Search Options","description":"Extra options for WEB Search","option_type":"param"},"structured_outputs":{"anyOf":[{},{"type":"null"}],"title":"Structured Outputs","option_type":"param"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","description":"Penalizing option","option_type":"param"},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","description":"Penalizing option","option_type":"param"},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","description":"Penalizing option","option_type":"param"},"stop":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop","description":"Customize stop condition","option_type":"param"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Enable streaming mode","default":false}},"type":"object","required":["messages","model"],"title":"CompletionRequest","description":"all parameters for an LLM completion request"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}