Citera home
Browse documentation

Content generation

Content generation

Start an idempotent content generation job.

Summarize with AIChatGPTClaudePerplexity

POST /v1/brands/{brand_id}/content/generations (content:generate, beta)

Headers: Idempotency-Key (required), Content-Type: application/json.

Body

Rules

content_type

one of the 11 formats and in GENERATION_CONTENT_TYPES (default: blog_post, howto_article, comparison_article, case_study, linkedin_post)

source.recommendation_id

UUID of a content_topic recommendation in this brand

source.prompt_id

prompt_<24 hex> from this brand's library

instructions

optional, ≤ 4,000 chars; treated as untrusted data and never placed in a system prompt

options.language

en, sv, de, fr, es, nl, da, no, fi

options.tone

expert, friendly, neutral, bold

options.target_length

short, standard, long

options.include_images

boolean (default false)

At least one source is required. There are no model, provider or URL fields.

Processing order: write capability (scope + api.generation.enabled + enrollment) → brand authorization → content-type allowlist → source resolution in the brand → idempotency → atomic job admission (credits + concurrency + row) → audit → enqueue.

Response 202:

{ "data": { "job_id": "…", "object": "job", "job_type": "content_generation",
            "status": "queued", "brand_id": "…", "content_id": null,
            "estimated_operation_units": 5, "created_at": "…" },
  "request_id": "req_…" }
{ "data": { "job_id": "…", "object": "job", "job_type": "content_generation",
            "status": "queued", "brand_id": "…", "content_id": null,
            "estimated_operation_units": 5, "created_at": "…" },
  "request_id": "req_…" }
{ "data": { "job_id": "…", "object": "job", "job_type": "content_generation",
            "status": "queued", "brand_id": "…", "content_id": null,
            "estimated_operation_units": 5, "created_at": "…" },
  "request_id": "req_…" }
{ "data": { "job_id": "…", "object": "job", "job_type": "content_generation",
            "status": "queued", "brand_id": "…", "content_id": null,
            "estimated_operation_units": 5, "created_at": "…" },
  "request_id": "req_…" }

Poll GET /v1/jobs/{job_id}. When it succeeds, read GET …/content/{result.content_id}?include=body.