ContentImage

API reference

Last updated:

POST /api/v1/render with a url or a title and you get back image URLs, sizes, alt text and a QA summary. Brands, sites and images have their own endpoints. Everything takes and returns JSON and needs a bearer key.

Render images

Give a url or a title. Optional fields: lang (fi, de, fr, es, en), sizes (og, featured, square, story), style (typographic, photo, quote, split), site_id or brand_id, or an inline brand.

curl -X POST https://contentimage.io/api/v1/render \
  -H "Authorization: Bearer ci_..." \
  -H "Content-Type: application/json" \
  -d '{"title":"Bundesverfassungsgerichtsentscheidung zur Straßenverkehrsordnung","lang":"de","sizes":["og","square"]}'

The response lists each image with id, size, style, url, width, height and alt, plus a qa object with score, notes and needs_review. Without an Anthropic key on the server the QA step is skipped and score is null.

Endpoints

POST  /api/v1/render
GET   /api/v1/brands          POST /api/v1/brands
PATCH /api/v1/brands/:id      (only the fields you send change)
POST  /api/v1/brands/from-url
GET   /api/v1/sites           POST /api/v1/sites
PATCH /api/v1/sites/:id       (agent_enabled, mode: auto | approve)
DELETE /api/v1/sites/:id
POST  /api/v1/sites/:id/sweep
GET   /api/v1/images?site_id=&status=
POST  /api/v1/images/:id/approve
POST  /api/v1/images/:id/reject

Errors

Errors look like {"error":{"code":"...","message":"..."}}. Unknown routes and wrong methods answer in the same JSON shape (not_found 404, method_not_allowed 405). Codes you will meet: unauthorized (401), invalid_request (400), invalid_url (400, a saved URL is not http(s) or points at a private address), url_blocked (422), unsupported_script (422, the headline uses a script the fonts cannot draw), unreachable (422), not_found (404), plan_limit (402), rate_limited (429).