Generate article images

Generates the cover and in-content images for an article from your prompts, stores them and puts them into the article. Write `{{IMAGE_1}}`, `{{IMAGE_2}}`, ... on their own lines in the content where each image belongs, then send one prompt per marker. Each prompt describes the scene; ArticlesQ adds the project's image style, its logo and character (following the project's image settings, see `GET /image-settings`) and the project's brand notes. Images are generated in parallel and the response returns the updated article. To replace an in-content image, put its marker back in the content with `PATCH /articles/{slug}` and send its prompt again.

POST
/articles/{slug}/images

Generates the cover and in-content images for an article from your prompts, stores them and puts them into the article. Write {{IMAGE_1}}, {{IMAGE_2}}, ... on their own lines in the content where each image belongs, then send one prompt per marker. Each prompt describes the scene; ArticlesQ adds the project's image style, its logo and character (following the project's image settings, see GET /image-settings) and the project's brand notes. Images are generated in parallel and the response returns the updated article. To replace an in-content image, put its marker back in the content with PATCH /articles/{slug} and send its prompt again.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

ArticlesQ API key sent as Authorization: Bearer aq_live_.... Each key is scoped to a single project.

In: header

Path Parameters

slug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

import ArticlesQ from "@articlesq/sdk";const articlesq = new ArticlesQ({ apiKey: process.env.ARTICLESQ_API_KEY });// See SDK docs: https://articlesq.com/docs/sdk
{
  "article": {
    "id": "clx1abc234...",
    "slug": "best-crm-for-startups",
    "title": "Best CRM for Startups in 2026",
    "keyword": "best crm for startups",
    "metaDescription": "A practical guide to choosing the right CRM when you're under 50 employees.",
    "content": "# Introduction\n\nIf you're a startup founder...",
    "coverImage": "https://cdn.articlesq.com/images/proj_abc/best-crm-for-startups/cover.jpeg",
    "faq": [
      {
        "q": "What is the best CRM for early-stage startups?",
        "a": "For teams under 20 people, lightweight tools like HubSpot Free or Folk are usually a better fit than enterprise CRMs."
      }
    ],
    "status": "draft",
    "datePublished": "2026-05-23T00:00:00.000Z",
    "dateModified": "2026-06-01T00:00:00.000Z"
  },
  "images": {
    "generated": [
      "COVER",
      "IMAGE_1",
      "IMAGE_2"
    ],
    "failed": [
      "IMAGE_3"
    ]
  }
}
{
  "error": {
    "title": "Unauthorized",
    "status": 401,
    "code": "missing_auth",
    "message": "Missing Authorization header",
    "instance": "/api/v1/articles",
    "details": {
      "property1": {},
      "property2": {}
    }
  }
}

{
  "error": {
    "title": "Unauthorized",
    "status": 401,
    "code": "missing_auth",
    "message": "Missing Authorization header",
    "instance": "/api/v1/articles"
  }
}

{
  "error": {
    "title": "Forbidden",
    "status": 403,
    "code": "insufficient_scope",
    "message": "Missing required scope: images:write",
    "instance": "/api/v1/articles/{slug}/images"
  }
}
{
  "error": {
    "title": "Not Found",
    "status": 404,
    "code": "not_found",
    "message": "Article not found",
    "instance": "/api/v1/articles/best-crm-for-startups/images"
  }
}