CreaVibeAPIVolver a CreaVibe

Trabajos de IA

Crea imágenes y SVG y aplica estilos con IA. Son trabajos asíncronos: POST /jobs responde 202 con el trabajo y la cabecera Location, y lo consultas hasta que termina (o recibes un webhook). El resultado se guarda en tu biblioteca. Envía Idempotency-Key para reintentar sin pagar dos veces.

EndpointDescripción
GET /image-stylesListar estilos de imagen
POST /jobsCrear una imagen
POST /jobsAplicar un estilo
POST /jobsCrear un SVG
GET /jobs/{id}Consultar un trabajo

Listar estilos de imagen

GET/image-styles

Devuelve los estilos que acepta un trabajo restyle_image (input.style).

Parámetros de consulta

NombreTipoDescripción
pageenteroPágina, desde 1.
page_sizeenteroResultados por página (24 por defecto, máximo 100).

Ejemplo

curl "https://creavibe.app/api/v1/image-styles?page_size=3" \
  -H "Authorization: Bearer cv_TU_TOKEN"
const respuesta = await fetch('https://creavibe.app/api/v1/image-styles?page_size=3', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer cv_TU_TOKEN',
  },
});
const datos = await respuesta.json();
import requests

respuesta = requests.get(
    "https://creavibe.app/api/v1/image-styles?page_size=3",
    headers={"Authorization": "Bearer cv_TU_TOKEN"},
)
datos = respuesta.json()
Respuesta · 200
{
  "count": 23,
  "next": "https://creavibe.app/api/v1/image-styles?page_size=3&page=2",
  "previous": null,
  "results": [
    {
      "slug": "minimal",
      "name": "Minimal",
      "image_url": "https://creavibe.app/media/estilos/estilo-minimal.webp"
    },
    {
      "slug": "maximalista",
      "name": "Maximalista",
      "image_url": "https://creavibe.app/media/estilos/estilo-maximalista.webp"
    },
    {
      "slug": "sci-fi",
      "name": "Sci-fi",
      "image_url": "https://creavibe.app/media/estilos/estilo-sci-fi.webp"
    }
  ]
}

Errores: 401

Crear una imagen

POST/jobs1 créditoIdempotency-Key

Trabajo generate_image: crea una imagen a partir de una descripción.

Cuerpo (JSON)

NombreTipoDescripción
typeobligatoriotextogenerate_image.
input.promptobligatoriotextoQué quieres ver (se usan los 500 primeros caracteres).
input.aspect_ratiotextoProporción: 1:1 (por defecto), 4:5, 3:4, 2:3, 9:16, 16:9, 3:2, 4:3, 5:4, 21:9 o 9:21.
webhook_urltextoURL https que recibe el aviso al terminar (ver Webhooks).

Ejemplo

curl -X POST "https://creavibe.app/api/v1/jobs" \
  -H "Authorization: Bearer cv_TU_TOKEN" \
  -H 'Idempotency-Key: f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d' \
  -H "Content-Type: application/json" \
  -d '{"type":"generate_image","input":{"prompt":"A red apple on a wooden table, soft daylight","aspect_ratio":"4:5"}}'
const respuesta = await fetch('https://creavibe.app/api/v1/jobs', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cv_TU_TOKEN',
    'Idempotency-Key': 'f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "type": "generate_image",
    "input": {
      "prompt": "A red apple on a wooden table, soft daylight",
      "aspect_ratio": "4:5"
    }
  }),
});
const datos = await respuesta.json();
import requests

respuesta = requests.post(
    "https://creavibe.app/api/v1/jobs",
    headers={"Authorization": "Bearer cv_TU_TOKEN", "Idempotency-Key": 'f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d'},
    json={
        "type": "generate_image",
        "input": {
            "prompt": "A red apple on a wooden table, soft daylight",
            "aspect_ratio": "4:5"
        }
    },
)
datos = respuesta.json()
Cabeceras de la respuesta
Location: /api/v1/jobs/394730eb-3747-4fd2-9e06-9a945e9f12fb
Respuesta · 202
{
  "id": "394730eb-3747-4fd2-9e06-9a945e9f12fb",
  "type": "generate_image",
  "status": "queued",
  "style": null,
  "asset": null,
  "reply": null,
  "error": null,
  "credits_remaining": 19,
  "webhook_url": null,
  "created_at": "2026-10-12T10:10:32.061Z",
  "updated_at": "2026-10-12T10:10:32.061Z"
}

Errores: 401, 402, 422, 429

Aplicar un estilo

POST/jobs1 créditoIdempotency-Key

Trabajo restyle_image: aplica un estilo, o un cambio descrito, a una imagen de tu biblioteca. El resultado es una imagen nueva; la original no cambia.

Cuerpo (JSON)

NombreTipoDescripción
typeobligatoriotextorestyle_image.
input.asset_idobligatoriouuidImagen de tu biblioteca (o input.image_url, su URL).
input.styletextoSlug de un estilo de Listar estilos de imagen.
input.prompttextoCambio descrito, si no usas style.
webhook_urltextoURL https que recibe el aviso al terminar.

Ejemplo

curl -X POST "https://creavibe.app/api/v1/jobs" \
  -H "Authorization: Bearer cv_TU_TOKEN" \
  -H 'Idempotency-Key: f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d' \
  -H "Content-Type: application/json" \
  -d '{"type":"restyle_image","input":{"asset_id":"cb901a12-c1cb-4537-9d7f-ac405cee99fc","style":"retro"}}'
const respuesta = await fetch('https://creavibe.app/api/v1/jobs', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cv_TU_TOKEN',
    'Idempotency-Key': 'f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "type": "restyle_image",
    "input": {
      "asset_id": "cb901a12-c1cb-4537-9d7f-ac405cee99fc",
      "style": "retro"
    }
  }),
});
const datos = await respuesta.json();
import requests

respuesta = requests.post(
    "https://creavibe.app/api/v1/jobs",
    headers={"Authorization": "Bearer cv_TU_TOKEN", "Idempotency-Key": 'f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d'},
    json={
        "type": "restyle_image",
        "input": {
            "asset_id": "cb901a12-c1cb-4537-9d7f-ac405cee99fc",
            "style": "retro"
        }
    },
)
datos = respuesta.json()
Cabeceras de la respuesta
Location: /api/v1/jobs/cf9c2935-7137-42cb-af91-e44af5e3c1c5
Respuesta · 202
{
  "id": "cf9c2935-7137-42cb-af91-e44af5e3c1c5",
  "type": "restyle_image",
  "status": "queued",
  "style": "retro",
  "asset": null,
  "reply": null,
  "error": null,
  "credits_remaining": 18,
  "webhook_url": null,
  "created_at": "2026-10-12T10:10:32.070Z",
  "updated_at": "2026-10-12T10:10:32.070Z"
}

Errores: 401, 402, 409, 422, 429

Crear un SVG

POST/jobs1 crédito por iconoIdempotency-Key

Trabajo generate_svg: crea un SVG a partir de una descripción, suelto o un sprite (un solo archivo con 2 a 6 iconos del mismo estilo en rejilla). Cuesta 1 crédito por icono; si salen menos, se devuelve la diferencia.

Cuerpo (JSON)

NombreTipoDescripción
typeobligatoriotextogenerate_svg.
input.promptobligatoriotextoQué dibujar.
input.icon_countenteroDe 1 (por defecto) a 6.
webhook_urltextoURL https que recibe el aviso al terminar.

Ejemplo

curl -X POST "https://creavibe.app/api/v1/jobs" \
  -H "Authorization: Bearer cv_TU_TOKEN" \
  -H 'Idempotency-Key: f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d' \
  -H "Content-Type: application/json" \
  -d '{"type":"generate_svg","input":{"prompt":"Coffee shop icons: cup, bean, croissant","icon_count":3}}'
const respuesta = await fetch('https://creavibe.app/api/v1/jobs', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cv_TU_TOKEN',
    'Idempotency-Key': 'f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "type": "generate_svg",
    "input": {
      "prompt": "Coffee shop icons: cup, bean, croissant",
      "icon_count": 3
    }
  }),
});
const datos = await respuesta.json();
import requests

respuesta = requests.post(
    "https://creavibe.app/api/v1/jobs",
    headers={"Authorization": "Bearer cv_TU_TOKEN", "Idempotency-Key": 'f3b1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d'},
    json={
        "type": "generate_svg",
        "input": {
            "prompt": "Coffee shop icons: cup, bean, croissant",
            "icon_count": 3
        }
    },
)
datos = respuesta.json()
Cabeceras de la respuesta
Location: /api/v1/jobs/974c1661-3528-4099-9406-9688f1248f78
Respuesta · 202
{
  "id": "974c1661-3528-4099-9406-9688f1248f78",
  "type": "generate_svg",
  "status": "queued",
  "style": null,
  "asset": null,
  "reply": null,
  "error": null,
  "credits_remaining": 15,
  "webhook_url": null,
  "created_at": "2026-10-12T10:10:32.074Z",
  "updated_at": "2026-10-12T10:10:32.074Z"
}

Errores: 401, 402, 422, 429

Consultar un trabajo

GET/jobs/{id}

Devuelve el estado de un trabajo: queued, processing, succeeded (con asset) o failed (con error.code; los créditos se devuelven). Tiene su propio límite: consultarlo no gasta el general.

Parámetros de la ruta

NombreTipoDescripción
idobligatoriouuidId del trabajo.

Ejemplo

curl "https://creavibe.app/api/v1/jobs/394730eb-3747-4fd2-9e06-9a945e9f12fb" \
  -H "Authorization: Bearer cv_TU_TOKEN"
const respuesta = await fetch('https://creavibe.app/api/v1/jobs/394730eb-3747-4fd2-9e06-9a945e9f12fb', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer cv_TU_TOKEN',
  },
});
const datos = await respuesta.json();
import requests

respuesta = requests.get(
    "https://creavibe.app/api/v1/jobs/394730eb-3747-4fd2-9e06-9a945e9f12fb",
    headers={"Authorization": "Bearer cv_TU_TOKEN"},
)
datos = respuesta.json()
Respuesta · 200
{
  "id": "394730eb-3747-4fd2-9e06-9a945e9f12fb",
  "type": "generate_image",
  "status": "succeeded",
  "style": null,
  "asset": {
    "id": "ba0f0e44-38f6-497a-86d7-0fa26638ef4f",
    "url": "https://creavibe.app/media/recursos/017dfef2-eaf5-429a-86f3-307b8bf36189/fe9c605529e44f34b85de1305c39c239.png",
    "thumbnail_url": "https://creavibe.app/media/miniaturas/recurso/51a5e906ffa3464f874b1156cc35212e.webp",
    "type": "image",
    "source": "generated",
    "name": "A red apple on a wooden table, soft daylight",
    "font_family": null,
    "width": 896,
    "height": 1152,
    "size_bytes": 1181799,
    "created_at": "2026-10-12T10:10:40.432Z"
  },
  "reply": null,
  "error": null,
  "credits_remaining": 15,
  "webhook_url": null,
  "created_at": "2026-10-12T10:10:32.061Z",
  "updated_at": "2026-10-12T10:10:32.084Z"
}

Errores: 401, 404