{"openapi":"3.1.0","info":{"title":"Suncake AI Form Builder API","description":"Create online forms, surveys, quizzes, and polls instantly from a text description. Free, no authentication required. The AI generates questions, answer options, and a custom design matching the form's topic. Supports all languages.","version":"1.0.0","contact":{"email":"contact@suncake.com"}},"servers":[{"url":"https://suncake.com"}],"paths":{"/api/v1/create_ai_form":{"post":{"operationId":"createAiForm","summary":"Create a form from a natural language description","description":"Send a text prompt describing the form you need. The AI generates all questions, answer options, and a matching visual design. Returns a shareable URL. No authentication required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":10000,"description":"Natural language description of the form to create"},"language":{"type":"string","description":"ISO language code (e.g. en, fr, es). Auto-detected if omitted."},"title":{"type":"string","description":"Form title. Auto-generated if omitted."},"email":{"type":"string","format":"email","description":"Email for response notifications."},"mode":{"type":"string","enum":["preview"],"description":"Set to 'preview' to see what would be created without actually creating it."}}}}}},"responses":{"201":{"description":"Form created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"status":{"type":"string","enum":["created"]},"survey_id":{"type":"integer"},"survey_url":{"type":"string","format":"uri","description":"Shareable link to fill out the form"},"admin_url":{"type":"string","format":"uri","description":"Link to manage and view responses (auto-login)"},"edit_url":{"type":"string","format":"uri","description":"Link to edit questions (auto-login)"},"title":{"type":"string","description":"Generated form title"},"questions_count":{"type":"integer"},"language":{"type":"string"}}}}}},"200":{"description":"Preview mode — returns what would be created without creating it"},"400":{"description":"invalid_prompt or prompt_too_long"},"422":{"description":"generation_failed — AI could not generate the form"},"429":{"description":"too_many_requests — max 30 per hour per IP"},"503":{"description":"service_unavailable — daily limit reached"}}},"get":{"operationId":"createAiFormSimple","summary":"Create a form via GET (simple version for basic agents)","description":"Same as POST but via query string. Use ?prompt=your+form+description. For agents that can open URLs but cannot make POST requests.","parameters":[{"name":"prompt","in":"query","required":true,"schema":{"type":"string"},"description":"Form description"},{"name":"language","in":"query","required":false,"schema":{"type":"string"},"description":"ISO language code"},{"name":"title","in":"query","required":false,"schema":{"type":"string"},"description":"Form title"}],"responses":{"201":{"description":"Form created successfully (same response as POST)"}}}},"/api/v1/health":{"get":{"operationId":"getHealth","summary":"Service health check and tool discovery","description":"Returns service status, available tools with schemas, examples, and documentation links. Use this to discover what Suncake can do.","responses":{"200":{"description":"Service info with tool definitions"}}}}}}