{"openapi": "3.1.0", "info": {"title": "SnapPrice", "version": "1.0.0", "description": "Rewrite a prompt so the AI answers better on the first try, with fewer tokens. English and Japanese."}, "servers": [{"url": "https://snap-price.com"}], "paths": {"/api/v1/optimize": {"post": {"operationId": "optimizePrompt", "summary": "Optimize the user's prompt before answering it", "description": "Send the user's prompt exactly as written. Show the optimized prompt in one short line, then answer the optimized prompt.", "parameters": [{"name": "via", "in": "query", "required": true, "schema": {"type": "string", "enum": ["gpt"]}, "description": "Always 'gpt'."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["prompt"], "properties": {"prompt": {"type": "string", "description": "The user's prompt (max 2,000 characters)."}, "background": {"type": "string", "description": "Optional: the user's role or project."}}}}}}, "responses": {"200": {"description": "The optimized prompt", "content": {"application/json": {"schema": {"type": "object", "properties": {"optimizedPrompt": {"type": "string"}, "summary": {"type": "string"}, "changes": {"type": "array", "items": {"type": "string"}}, "bestTool": {"type": "string"}, "language": {"type": "string"}, "estimatedTokens": {"type": "object", "properties": {"before": {"type": "integer"}, "after": {"type": "integer"}, "savedPct": {"type": "number"}}}}}}}}, "401": {"description": "Missing or invalid API key"}, "429": {"description": "Daily limit reached"}}, "security": [{"apiKey": []}]}}}, "components": {"schemas": {}, "securitySchemes": {"apiKey": {"type": "apiKey", "in": "header", "name": "x-user-key"}}}}