v1.1.0 — REST API for AI agents and integrations
All API requests require a Bearer token in the Authorization header.
Authorization: Bearer sk_live_your_api_key_hereGenerate API keys from the Studio dashboard or via the POST /api/keys endpoint.
For REST API access. Use from your backend, scripts, or AI agent workflows. Full access to all generation and export endpoints.
For MCP server connections. Pass as INFINIXUI_API_KEY env var when running the MCP server.
Scopes available:
carousel:generate — Create and export carouselsebook:generate — Create ebooksconfig:read — List templates, themes, formatsfiles:read — List generated files| Plan | Requests/min | Generations/day |
|---|---|---|
| Free | 10 | 50 |
| Pro | 60 | 500 |
| Enterprise | Unlimited | Unlimited |
/api/configconfig:readReturns all available templates, themes, formats, designs, and modes. Use this to discover what options are available before generating content.
Request
curl -X GET https://infinixui.dev/api/config \
-H "Authorization: Bearer sk_live_..."Response
{
"success": true,
"version": "1.1.0",
"modes": [
{ "value": "carousel", "label": "Carrousel" },
{ "value": "ebook", "label": "Ebook" }
],
"templates": [...],
"designs": [...],
"formats": [...],
"ebookTemplates": [...],
"ebookThemes": [...]
}/api/carousel/generatecarousel:generateCreate a new carousel from structured slide data. Returns a studio URL for visual editing and session ID for exports.
Request
curl -X POST https://infinixui.dev/api/carousel/generate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"template": "carousel-pro",
"format": "linkedin-carousel",
"design": "modern",
"title": "5 Tips for Better UX",
"subtitle": "A guide for designers",
"author": "Jane Doe",
"slides": [
{ "title": "Tip 1", "content": "Keep it simple..." },
{ "title": "Tip 2", "content": "Use whitespace..." }
],
"cta_text": "Follow for more",
"cta_url": "https://example.com"
}'Response
{
"success": true,
"id": "carousel_1709312345_a1b2c3",
"studioUrl": "https://infinixui.dev/studio/carousel-pro?session=...",
"pdfUrl": "/generated/carousel_1709312345_a1b2c3.pdf",
"slideImages": ["/generated/slide_0.png", "..."]
}/api/ebook/generateebook:generateCreate an ebook layout from structured chapter data. Returns a studio URL to view, edit, and export the ebook as PDF.
Request
curl -X POST https://infinixui.dev/api/ebook/generate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"templateId": "guide-pratique",
"theme": "stripe",
"title": "The Complete Guide to AI",
"subtitle": "Everything you need to know",
"author": "John Smith",
"chapters": [
{
"title": "Introduction to AI",
"hook": "AI is transforming...",
"sections": [
{
"title": "What is AI?",
"content": ["Paragraph 1...", "Paragraph 2..."]
}
],
"summary": ["Key point 1", "Key point 2"],
"tip": "Start with simple models"
}
],
"introduction": { "body": "Welcome to this guide..." },
"conclusion": { "body": "In summary...", "summary": "..." }
}'Response
{
"success": true,
"id": "ebook_1709312345_x7y8z9",
"studioUrl": "https://infinixui.dev/ebook/guide-pratique?session=...",
"templateId": "guide-pratique",
"theme": "stripe",
"title": "The Complete Guide to AI",
"chaptersCount": 1
}/api/carousel/export-pdfcarousel:generateExport a previously generated carousel as a high-quality PDF. Requires the session ID from generate.
Request
curl -X POST https://infinixui.dev/api/carousel/export-pdf \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "sessionId": "carousel_1709312345_a1b2c3" }'Response
{
"success": true,
"pdfUrl": "/generated/carousel_1709312345_a1b2c3.pdf"
}/api/filesfiles:readList all previously generated carousels and ebooks.
Request
curl -X GET https://infinixui.dev/api/files \
-H "Authorization: Bearer sk_live_..."Response
{
"success": true,
"records": [
{
"id": "carousel_...",
"mode": "carousel",
"title": "5 Tips for Better UX",
"createdAt": "2025-03-09T..."
},
{
"id": "ebook_...",
"mode": "ebook",
"title": "The Complete Guide to AI",
"createdAt": "2025-03-09T..."
}
]
}/api/keysGenerate a new API key or MCP access token. Requires JWT authentication.
Request
curl -X POST https://infinixui.dev/api/keys \
-H "Authorization: Bearer <jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Agent Key",
"keyType": "api",
"scopes": ["carousel:generate", "ebook:generate", "config:read"]
}'Response
{
"success": true,
"key": {
"id": "uuid-...",
"name": "My Agent Key",
"key_prefix": "sk_live_a1b2c3d4",
"key_type": "api",
"scopes": ["carousel:generate", "ebook:generate", "config:read"],
"rawKey": "sk_live_a1b2c3d4e5f6..."
},
"message": "Save your API key now. You will not be able to see it again."
}/api/keysList all API keys for the authenticated user. Key secrets are never shown.
Request
curl -X GET https://infinixui.dev/api/keys \
-H "Authorization: Bearer <jwt_token>"Response
{
"success": true,
"keys": [
{
"id": "uuid-...",
"name": "My Agent Key",
"key_prefix": "sk_live_a1b2...",
"key_type": "api",
"scopes": ["carousel:generate", "ebook:generate"],
"last_used_at": "2025-03-09T...",
"revoked": false,
"created_at": "2025-03-08T..."
}
]
}/api/keys?id={keyId}Revoke an API key by its ID. The key will immediately stop working.
Request
curl -X DELETE "https://infinixui.dev/api/keys?id=uuid-..." \
-H "Authorization: Bearer <jwt_token>"Response
{
"success": true,
"message": "Key revoked."
}| Code | Meaning | Action |
|---|---|---|
| 401 | Invalid or missing API key | Check your Bearer token |
| 403 | Insufficient scope | Create a key with the required scope |
| 429 | Rate limit exceeded | Wait and retry, or upgrade plan |
| 500 | Internal error | Retry or contact support |