REST API · v1

Vizion AI API Reference

Generate professional presentations, documents, and slides programmatically. Integrate Vizion AI's generation engine into your B2B workflows.

https://vizion.groupquimera.com/api/v1

Authentication

All API requests require an API key. Pass it via the x-api-key header or as a Bearer token in the Authorization header.

Option 1 — x-api-key header

curl -H "x-api-key: vz_your_api_key_here" \
  https://vizion.groupquimera.com/api/v1/credits

Option 2 — Bearer token

curl -H "Authorization: Bearer vz_your_api_key_here" \
  https://vizion.groupquimera.com/api/v1/credits

Keep your API key secret. It grants full access to your account. Generate one from your account settings.

Endpoints

POST/generate
Costs 1 credit

Create a new AI-generated presentation or document.

Request Body

FieldTypeRequiredDescription
topicstringYesThe topic or prompt to generate content about
formatstringNopresentation (default), document, webpage
numCardsnumberNoNumber of slides/cards (default: 10)
languagestringNoLanguage code, e.g. en, es, fr (default: en)
tonestringNoprofessional, casual, academic, creative
audiencestringNoTarget audience description
exportAsstringNopdf (default), pptx, png

Example Request

curl -X POST https://vizion.groupquimera.com/api/v1/generate \
  -H "x-api-key: vz_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "The Future of Renewable Energy",
    "format": "presentation",
    "numCards": 12,
    "language": "en",
    "tone": "professional",
    "exportAs": "pdf"
  }'

Response (201 Created)

{
  "generationId": "gen_abc123",
  "generationRefId": "ref_xyz789",
  "status": "processing",
  "creditsRemaining": 24
}
GET/generations/:id
Poll for status

Check the status of a generation. Poll this endpoint until status is completed or failed.

Example Request

curl https://vizion.groupquimera.com/api/v1/generations/gen_abc123 \
  -H "x-api-key: vz_your_api_key_here"

Response (completed)

{
  "id": "gen_abc123",
  "status": "completed",
  "viewUrl": "/dashboard/view/gen_abc123",
  "exportUrl": "/api/download/gen_abc123",
  "creditsUsed": 1
}

Polling tip: Generation typically takes 15–60 seconds. Poll every 5 seconds. The status will be processing until complete.

GET/credits
Check balance

Get your current credit balance and plan.

Example Request

curl https://vizion.groupquimera.com/api/v1/credits \
  -H "x-api-key: vz_your_api_key_here"

Response

{
  "balance": 25,
  "plan": "pro"
}

Code Examples

Python
import requests
import time

API_KEY = "vz_your_api_key_here"
BASE_URL = "https://vizion.groupquimera.com/api/v1"
HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"}

# Start generation
response = requests.post(f"{BASE_URL}/generate", headers=HEADERS, json={
    "topic": "AI Trends in 2026",
    "format": "presentation",
    "numCards": 10,
    "exportAs": "pdf",
})
data = response.json()
generation_id = data["generationId"]
print(f"Generation started: {generation_id}")

# Poll for completion
while True:
    status_response = requests.get(
        f"{BASE_URL}/generations/{generation_id}",
        headers=HEADERS
    )
    status = status_response.json()
    print(f"Status: {status['status']}")

    if status["status"] == "completed":
        print(f"Download: {status['exportUrl']}")
        break
    elif status["status"] == "failed":
        print(f"Error: {status.get('error')}")
        break

    time.sleep(5)
JavaScript / Node.js
const API_KEY = "vz_your_api_key_here";
const BASE_URL = "https://vizion.groupquimera.com/api/v1";
const headers = { "x-api-key": API_KEY, "Content-Type": "application/json" };

async function generate(topic) {
  // Start generation
  const res = await fetch(`${BASE_URL}/generate`, {
    method: "POST",
    headers,
    body: JSON.stringify({ topic, format: "presentation", exportAs: "pdf" }),
  });
  const { generationId } = await res.json();
  console.log("Started:", generationId);

  // Poll until complete
  while (true) {
    await new Promise(r => setTimeout(r, 5000));
    const poll = await fetch(`${BASE_URL}/generations/${generationId}`, { headers });
    const status = await poll.json();
    console.log("Status:", status.status);

    if (status.status === "completed") {
      console.log("Download URL:", status.exportUrl);
      return status;
    }
    if (status.status === "failed") throw new Error(status.error);
  }
}

generate("AI Trends in 2026").catch(console.error);

Rate Limits & Errors

Rate Limits

Free plan10 req / min
Pro plan60 req / min
EnterpriseCustom

Error Codes

400Bad request / missing field
401Invalid or missing API key
402Insufficient credits
404Generation not found
500Internal server error

Ready to integrate?

Get your API key from your account settings and start building.