{ "openapi": "3.0.0", "info": { "title": "AI Code & Text Toolkit", "description": "4-in-1 AI toolkit: code generation in 10+ languages, text summarization, 100+ language translation, and sentiment analysis. Powered by DeepSeek. Perfect for developers, content creators, and businesses.", "version": "1.0.0", "contact": { "name": "API Support", "url": "https://github.com/z1439527767/ai-code-api" } }, "servers": [ { "url": "https://ai-code-api-sxmb.onrender.com", "description": "Production server" } ], "paths": { "/generate": { "post": { "summary": "Generate Code", "description": "Convert natural language descriptions into production-ready code in 10+ programming languages.", "operationId": "generateCode", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["prompt"], "properties": { "prompt": { "type": "string", "description": "What code do you need?" }, "language": { "type": "string", "default": "python", "description": "Programming language" }, "style": { "type": "string", "default": "production", "enum": ["production", "minimal", "documented"] } } }, "example": { "prompt": "Sort a list of dictionaries by a key in Python", "language": "python", "style": "production" } } } }, "responses": { "200": { "description": "Generated code" } } } }, "/summarize": { "post": { "summary": "Summarize Text", "description": "Summarize long text into concise output — bullet points, executive summary, or plain concise style.", "operationId": "summarizeText", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string", "description": "Text to summarize" }, "max_length": { "type": "integer", "default": 200 }, "style": { "type": "string", "default": "concise", "enum": ["concise", "bullet-points", "executive"] } } }, "example": { "text": "AI is transforming how we work...", "max_length": 50, "style": "bullet-points" } } } }, "responses": { "200": { "description": "Summarized text" } } } }, "/translate-text": { "post": { "summary": "Translate Text", "description": "Translate text between 100+ languages with AI-powered accuracy.", "operationId": "translateText", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["text", "target_lang"], "properties": { "text": { "type": "string", "description": "Text to translate" }, "source_lang": { "type": "string", "default": "auto" }, "target_lang": { "type": "string", "description": "Target language" } } }, "example": { "text": "Hello, how are you?", "target_lang": "Chinese" } } } }, "responses": { "200": { "description": "Translated text" } } } }, "/sentiment": { "post": { "summary": "Analyze Sentiment", "description": "Detect sentiment (positive, negative, neutral, mixed) with confidence scores.", "operationId": "analyzeSentiment", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string", "description": "Text to analyze" } } }, "example": { "text": "I absolutely love this product!" } } } }, "responses": { "200": { "description": "Sentiment analysis result" } } } } } }