integrations

Using the Canvora REST API

Generate visuals programmatically with API keys — authenticate, create generations, and integrate Canvora into your apps

8 min read Intermediate

Canvora's REST API lets you generate visuals programmatically from your own applications. You can create generations, check status, retrieve outputs, and edit images — all with a simple API key.

Requirements

API keys are available on Pro and Business plans. Free and Starter users can upgrade at canvora.ai/subscription.

Creating an API Key

  1. Go to canvora.ai/integrations and select the API Keys tab
  2. Click Create New Key
  3. Give it a name (e.g., "My App" or "Content Pipeline")
  4. Copy the key immediately — it's only shown once

Your key starts with vd_ and looks like: vd_abc123def456...

Authentication

Include your API key in the X-API-Key header of every request:

X-API-Key: vd_your_api_key_here

Quick Start

Create a generation

curl -X POST https://api.canvora.ai/api/generations -H "X-API-Key: vd_YOUR_KEY" -H "Content-Type: application/json" -d '{"input_type":"text","input_content":"5 tips for remote work productivity","output_formats":["linkedin_carousel"],"carousel_slides":{"linkedin_carousel":5}}'

This returns a generation ID that you can poll for status.

Check generation status

curl https://api.canvora.ai/api/generations/GENERATION_ID -H "X-API-Key: vd_YOUR_KEY"

When status is "completed", the outputs array contains your image URLs.

List your brand kits

curl https://api.canvora.ai/api/brands -H "X-API-Key: vd_YOUR_KEY"

Check credit balance

curl https://api.canvora.ai/api/credits/balance -H "X-API-Key: vd_YOUR_KEY"

Available Endpoints

MethodEndpointDescription
POST/api/generationsCreate a new generation
GET/api/generationsList your generations
GET/api/generations/:idGet generation status and outputs
GET/api/brandsList your brand kits
GET/api/credits/balanceCheck credit balance
GET/api/idea-mode/formatsList all available formats
POST/api/images/:id/editEdit a generated image

Generation Parameters

When creating a generation via POST /api/generations:

ParameterTypeRequiredDescription
input_typestringYes"text", "url", or "pdf"
input_contentstringFor textThe text content to visualize
input_urlstringFor URLURL to extract content from
output_formatsstringYesArray of format IDs (e.g., ["instagram_post", "linkedin_carousel"])
carousel_slidesobjectFor carouselsSlide counts per format (e.g., {"linkedin_carousel": 7})
brand_idstringNoBrand kit ID to apply
visual_stylestringNoOne of: modern, minimal, bold, elegant, playful, corporate, creative, dark

Image Editing

Editing is a two-step process:

Step 1: Send edit instruction

curl -X POST https://api.canvora.ai/api/images/GENERATION_ID/edit -H "X-API-Key: vd_YOUR_KEY" -H "Content-Type: application/json" -d '{"outputId":"OUTPUT_ID","prompt":"Change the background to dark blue"}'

This returns a preview with a refined instruction.

Step 2: Confirm and execute

curl -X POST https://api.canvora.ai/api/images/GENERATION_ID/edit -H "X-API-Key: vd_YOUR_KEY" -H "Content-Type: application/json" -d '{"outputId":"OUTPUT_ID","prompt":"Change the background to dark blue","confirmedInstruction":"Change the background color from white to a deep navy blue (#1a1a4e)"}'

Rate Limits

OperationLimit
Read endpoints (GET)60 requests/minute
Generation (POST)20 requests/minute
Default30 requests/minute

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Error Responses

All errors follow this format:

{
  "error": "Error Type",
  "message": "Human-readable description",
  "code": "ERROR_CODE"
}

Common error codes:

StatusMeaning
401Invalid or missing API key
403Insufficient permissions or account deactivated
429Rate limit exceeded
402Insufficient credits

Security Best Practices

  • Never expose your API key in client-side code or public repositories
  • Use environment variables to store keys
  • Rotate keys periodically from the API Access page
  • Revoke any key immediately if it may have been compromised