Skip to content

Developers

AI videos from your own systems

An asynchronous, idempotent REST API, signed webhooks with retries, official SDKs and an MCP server for agents. A guaranteed price before producing.

The API, webhooks and MCP are part of the Pro and Agency plans.

Start in 5 steps

  1. 1
    Create an API key

    In the Studio: Integraciones → API REST → «Crear clave de API». It's shown only once.

  2. 2
    Get a quote

    POST /v1/estimates with the same request you'll create: the guaranteed maximum price in credits (1 credit = US$0.01).

  3. 3
    Create the job

    POST /v1/jobs with an Idempotency-Key: repeating the request never creates or charges twice. Answers 202 with the id.

  4. 4
    Follow it

    With webhooks (recommended), with live events (SSE) at /v1/jobs/{id}/events, or polling GET /v1/jobs/{id}.

  5. 5
    Download or publish

    When it's done, result.videos has the files; publish them to connected networks with POST /v1/publications.

# 1) cotiza · quote
curl https://api.creavideosconia.com/v1/estimates -H "Authorization: Bearer $AIVS_API_KEY" -H "Content-Type: application/json" \
  -d '{"kind":"idea","idea":"3 errores al elegir zapatillas para correr","channels":["tiktok"]}'

# 2) crea · create (idempotent)
curl https://api.creavideosconia.com/v1/jobs -H "Authorization: Bearer $AIVS_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: pedido-123" \
  -d '{"kind":"idea","idea":"3 errores al elegir zapatillas para correr","channels":["tiktok"]}'
# → 202 {"id":"job_…","status":"queued",…}

# 3) sigue · follow
curl -N https://api.creavideosconia.com/v1/jobs/job_…/events -H "Authorization: Bearer $AIVS_API_KEY"

Authentication, limits and errors

  • Send Authorization: Bearer aivs_… on every request. We keep only the key's hash; revoke it anytime.
  • Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; over the limit you get 429 with Retry-After. Your usage per key: GET /v1/usage/api.
  • Errors follow RFC 7807: type, title, status, detail and request_id (give it to support).
  • Everything goes over HTTPS (TLS 1.2 or higher). Jobs that fail on our side are not charged.

Webhooks

We notify your server when something happens. Subscribe in Integraciones or with POST /v1/webhooks; the signing secret is shown only once.

Available events
EventWhat it means
credits.lowThe available credits dropped below the low-balance threshold
job.canceledThe job was canceled
job.failedThe job failed; nothing was charged for the failed run
job.needs_reviewThe script is ready and waits for approval (approve or edit it)
job.queuedA job was accepted and waits for a worker
job.retryingA step failed and is being retried automatically
job.startedA worker started producing the job
job.succeededThe job finished: its videos and files are ready
order.paidA payment was confirmed: credits or a plan were added
order.refundedA payment was voided or refunded: its credits were taken back
publication.failedA scheduled publication failed for good
publication.publishedA video was published on a connected network
renewal.failedThe automatic renewal charge was declined
review.approvedYour client approved a video through an approval link
review.changes_requestedYour client asked for changes through an approval link

Verify the signature

Each notice carries X-AIVS-Timestamp and X-AIVS-Signature = hex(HMAC-SHA256(secret, timestamp + "." + body)). Verify over the raw body, in constant time, and reject timestamps older than 5 minutes. While you rotate the secret, the previous one signs in X-AIVS-Signature-Previous.

# Without the SDK (Python standard library)
import hashlib, hmac, time

def valid(body: bytes, ts: str, signature: str, secret: str) -> bool:
    if abs(time.time() - int(ts)) > 300:
        return False
    good = hmac.new(secret.encode(), ts.encode() + b"." + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(good, signature)

Deliveries and retries

  • Answer 2xx within 10 s; process in the background if it takes longer.
  • On failure we retry with growing waits (10 s … 1 h) up to 8 times, for about a day.
  • X-AIVS-Delivery carries the event id (the same on every retry): use it to ignore duplicates.
  • If you answer 410 Gone, we pause the webhook. See every delivery and its response, and redeliver, in Integraciones or through the API.

Official SDKs

Retries with backoff, automatic idempotency and webhook verification included.

npm install creavideosconia
import { CreaVideos, verifyWebhook, WebhookError } from "creavideosconia";

const api = new CreaVideos({ apiKey: process.env.AIVS_API_KEY! });
const job = await api.jobs.create({ kind: "idea", idea: "3 errores al elegir zapatillas", channels: ["tiktok"] });

// Next.js route handler (any Fetch-API runtime)
export async function POST(req: Request) {
  const raw = await req.text();                     // RAW body, before JSON.parse
  try {
    const event = await verifyWebhook(raw, req.headers, process.env.AIVS_WEBHOOK_SECRET!);
    if (event.type === "job.succeeded") { /* event.data.videos … */ }
    return new Response("ok");
  } catch (e) {
    if (e instanceof WebhookError) return new Response("bad signature", { status: 400 });
    throw e;
  }
}
pip install creavideosconia
from creavideosconia import Client, verify_webhook, WebhookError

api = Client("https://api.creavideosconia.com", "aivs_…")
job = api.create_job({"kind": "idea", "idea": "3 errores al elegir zapatillas", "channels": ["tiktok"]})

# Flask / FastAPI / Django: pass the RAW body and the headers
def webhook(body: bytes, headers) -> int:
    try:
        event = verify_webhook(body, headers, "whsec_…")
    except WebhookError:
        return 400
    if event["type"] == "job.succeeded":
        ...
    return 200

MCP for AI agents

Claude, ChatGPT, Cursor and other agents create and publish videos with your account. They connect with OAuth (you click «Allow») or an API key, and always quote before producing.

https://mcp.creavideosconia.com/mcp

Your next video is one idea away.

Create a free account, pick your industry and watch your first video being produced in about 4 minutes, with its cost to the cent.

No card · trial credits · ES/EN/PT