Swipee API
Programmatically generate AI-powered carousels, export images, and integrate with your workflow.
Generate
AI content from any topic
Export
PNG, PDF, or ZIP bundle
Video
Animated for Reels/TikTok
Base URL
https://swipee.io/apiAuthentication
Authenticate requests using your API key. You can find your API keys in your account settings.
Option 1: Authorization Header
curl https://swipee.io/api/generate \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"topic": "productivity tips"}'
Option 2: X-API-Key Header
curl https://swipee.io/api/generate \-H "X-API-Key: sk_your_api_key" \-H "Content-Type: application/json" \-d '{"topic": "productivity tips"}'
Security: Keep your API key secret. Never expose it in client-side code or public repositories.
Rate Limits
Limits are based on your subscription plan. Exceeding limits returns a 429 status code.
| Plan | Monthly Limit |
|---|---|
| Free | 3 carousels |
| Pro | 30 carousels |
| Unlimited | Unlimited |
/api/generate-imagesGenerate Carousel Images
End-to-end carousel generation. Send a topic, receive ready-to-post PNG images. No client-side rendering required.
Parameters
topicstringrequiredThe topic or prompt for carousel generation
slideCountintegerNumber of slides. Default: 5, Range: 3-10
languagestringContent language (en, es, fr, de, etc.). Default: en
themestringVisual theme. Default: gradientPurple
aspectRatiostring1:1, 4:5, 9:16, 16:9. Default: 4:5
widthintegerOutput width in pixels. Default: 1080
handlestringSocial handle for branding (@username)
showWatermarkbooleanAdd watermark. Default: false
outputstringzip (download) or json (base64). Default: zip
Example: Download ZIP
curl -X POST https://swipee.io/api/generate-images \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"topic": "5 productivity tips for developers","theme": "gradientPurple","aspectRatio": "4:5","handle": "@yourhandle"}' --output carousel.zip
Example: Get Base64
curl -X POST https://swipee.io/api/generate-images \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"topic": "Morning routine tips","output": "json"}'
JSON Response (output=json)
{"slides": [...],"images": [{"index": 1,"filename": "slide-01.png","base64": "iVBORw0KGgo...","dataUrl": "data:image/png;base64,iVBORw0KGgo..."}],"meta": {"slideCount": 5,"theme": "gradientPurple","aspectRatio": "4:5"}}
Response Codes
200Images generated successfully400Invalid request parameters401Invalid or missing API key429Rate limit exceeded/api/generateGenerate Carousel JSON
Generate carousel content as JSON data. Use this if you want to render slides yourself or need the raw content.
Parameters
topicstringrequiredThe topic or prompt for carousel generation
slideCountintegerNumber of slides to generate. Default: 5, Range: 3-10
languagestringContent language code (en, es, fr, de, etc.). Default: en
templateIdstringContent template ID. See Templates section
tonestringContent tone: educational, casual, or professional
includeImagesbooleanInclude image search suggestions in response
Example Request
curl -X POST https://swipee.io/api/generate \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"topic": "5 JavaScript tips for beginners","slideCount": 5,"tone": "educational"}'
Response
{"slides": [{"title": "5 JS Tips You Need","content": "Level up your JavaScript skills with these essential tips","code": null},{"title": "1. Use Optional Chaining","content": "Safely access nested properties without errors","code": "const name = user?.profile?.name ?? 'Guest';","language": "javascript","filename": "example.js"}],"meta": {"isCodeTopic": true,"slideCount": 5}}
Response Codes
200Content generated successfully400Invalid request parameters401Invalid or missing API key429Rate limit exceeded/api/exportExport Carousel
Render carousel slides as downloadable images (PNG/ZIP) or video. Requires server-side rendering setup.
Parameters
slidesarrayrequiredArray of slide objects (from /generate response)
formatstringrequiredExport format: png, zip, or video
themestringTheme ID. Default: gradientPurple
aspectRatiostringOutput ratio: 1:1, 4:5, 9:16, 16:9. Default: 4:5
widthintegerOutput width in pixels. Default: 1080
handlestringSocial handle for branding (e.g., @username)
Format Options
pngSingle slide image
zipAll slides as archive
videoAnimated MP4
Example
curl -X POST https://swipee.io/api/export \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"slides": [...],"format": "zip","theme": "gradientBlue","aspectRatio": "4:5"}' --output carousel.zip
/api/imagesSearch Images
Search royalty-free stock images from Pexels for use in your carousels.
Query Parameters
querystringrequiredSearch query for images
perPageintegerResults per page. Default: 12, Max: 80
pageintegerPage number for pagination. Default: 1
orientationstringFilter: landscape, portrait, or square
Example
curl "https://swipee.io/api/images?query=productivity&perPage=5" \-H "Authorization: Bearer sk_your_api_key"
/api/import-urlImport from URL
Extract content from any URL (blog posts, articles) and convert it into carousel-ready data.
Parameters
urlstringrequiredURL of the content to import
Example
curl -X POST https://swipee.io/api/import-url \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"url": "https://blog.example.com/article"}'
/api/import-twitterImport from Twitter/X
Convert a tweet or thread into carousel content.
Parameters
urlstringrequiredTwitter/X post URL
Example
curl -X POST https://swipee.io/api/import-twitter \-H "Authorization: Bearer sk_your_api_key" \-H "Content-Type: application/json" \-d '{"url": "https://x.com/user/status/123456789"}'
Content Templates
Use the templateId parameter to structure content in proven formats.
| Template ID | Description |
|---|---|
| quotes-motivational | Motivational quotes |
| tips-quick | Quick tips format |
| tips-mistakes | Common mistakes to avoid |
| howto-steps | Step-by-step guide |
| listicle-top | Top X list format |
| comparison-vs | This vs That comparison |
| comparison-myths | Myths vs Facts |
| story-transformation | Before/After transformation |
| educational-explainer | Concept explainer |
| educational-checklist | Checklist format |
Error Handling
All errors return standard HTTP status codes with a JSON body containing error details.
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request — Invalid or missing parameters |
| 401 | Unauthorized — Invalid or missing API key |
| 429 | Rate limited — Too many requests |
| 500 | Server error — Something went wrong |
Error Response Format
{"error": "Topic is required","code": "missing_parameter"}
Need help? Contact us at support@swipee.io