> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.hrizn.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create content (batch)

> Create up to 10 content items in a single request

Submit multiple content creation requests at once. Each item is processed independently — if one item fails validation, the others still succeed.

**Scope required:** `content:write`

## Request body

<ParamField body="items" type="array" required>
  Array of content creation objects (max 10). Each item accepts the same fields as [Create content](/api-reference/content/create).

  <Expandable title="Item properties">
    <ParamField body="ideacloud_id" type="string" required>
      UUID of a completed IdeaCloud.
    </ParamField>

    <ParamField body="article_type" type="string" required>
      One of: `basic`, `qa`, `expert`, `modellanding`, `comparison`, `salesevent`.
    </ParamField>

    <ParamField body="selected_question_ids" type="array">
      Array of question IDs (format: `q-{timestamp}-{index}`). Retrieve available IDs from [Get IdeaCloud questions](/api-reference/ideaclouds/get-questions).
    </ParamField>

    <ParamField body="brand_voice_id" type="string">
      UUID of a brand voice.
    </ParamField>

    <ParamField body="title" type="string">
      Custom title (max 500 characters).
    </ParamField>

    <ParamField body="language" type="string" default="English">
      Language for generated content. One of: `English`, `Spanish`, `Mandarin Chinese`, `Japanese`, `Korean`, `Arabic`, `Farsi`, `Hebrew`, `French`, `Tagalog`, `Vietnamese`, `Portuguese`, `Russian`.
    </ParamField>

    <ParamField body="content_intent" type="string" default="general">
      Link distribution strategy. One of: `fixed_ops`, `variable`, `general`.
    </ParamField>

    <ParamField body="auto_compliance" type="boolean" default="false">
      Automatically run compliance after generation.
    </ParamField>

    <ParamField body="auto_content_tools" type="boolean" default="false">
      Automatically generate SEO metadata, schemas, and social snippets.
    </ParamField>

    <ParamField body="content_depth" type="string" default="balanced">
      Content depth preset that drives the article body. One of `concise`, `steady`, `balanced`, `substantial`, or `in-depth`. Replaces `content_length`.
    </ParamField>

    <ParamField body="content_length" type="integer" deprecated>
      **Deprecated.** Article length is now driven by `content_depth`; this field is accepted for backward compatibility but has no effect.
    </ParamField>
  </Expandable>
</ParamField>

## Example Request

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://api.app.hrizn.io/v1/public/content/batch \
  -H "X-API-Key: hzk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "ideacloud_id": "cec6a411-7632-498e-b2e8-afb1ea1857d7",
        "article_type": "basic",
        "language": "French",
        "auto_compliance": true,
        "auto_content_tools": true
      },
      {
        "ideacloud_id": "1d1cf94d-803e-4459-89ca-6c246aa8a4a7",
        "article_type": "qa",
        "auto_compliance": true
      },
      {
        "ideacloud_id": "30993ec0-907b-47a4-b5f1-9c1f6bd33194",
        "article_type": "basic",
        "title": "Custom Article Title"
      }
    ]
  }'
```

## Response

Returns `202 Accepted` with status for each item.

<ResponseExample>
  ```json 202 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "data": {
      "items": [
        {
          "id": "407d63a9-74b7-41a4-9468-09dfdb71b0da",
          "status": "generating",
          "article_type": "qa",
          "title": "2026 Chevy Silverado 3500 DRW: Deep Dive",
          "created_at": "2026-02-28T11:41:46.114731+00:00",
          "message": "Generation typically completes within a few minutes. Configure webhooks to receive real-time status notifications: https://api-docs.hrizn.io/webhooks"
        },
        {
          "id": "2e06e64c-03a2-4ec5-854e-c0f385f1fecc",
          "status": "generating",
          "article_type": "expert",
          "title": "2026 Chevy Silverado 3500 DRW: The Definitive Guide",
          "created_at": "2026-02-28T11:41:46.073345+00:00",
          "message": "Generation typically completes within a few minutes. Configure webhooks to receive real-time status notifications: https://api-docs.hrizn.io/webhooks"
        }
      ],
      "message": "Generation typically completes within a few minutes. Configure webhooks to receive real-time status notifications: https://api-docs.hrizn.io/webhooks"
    }
  }
  ```
</ResponseExample>

<Tip>
  Content generation is asynchronous and typically completes within a few minutes. Configure [webhooks](/webhooks) to receive real-time `content.completed` and `content.failed` notifications instead of polling.
</Tip>

## Partial Failures

Each item in the batch is validated and processed independently. A single request may contain a mix of successful and failed items.

Check the `status` field on each item in the response:

| Status       | Meaning                                             |
| ------------ | --------------------------------------------------- |
| `generating` | Content creation started successfully               |
| `failed`     | Validation or processing failed — see `error` field |

<Warning>
  The batch endpoint returns `202 Accepted` even if some items fail. Always check each item's `status` in the response.
</Warning>

## When to Use Batch vs. Single

| Scenario                                                 | Recommended                                                                                  |
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Creating a single article with custom question selection | [Create content](/api-reference/content/create)                                              |
| Generating 3+ articles programmatically                  | **Create content (batch)**                                                                   |
| Generating 50+ articles                                  | Batch endpoint + throttling (see [Bulk Content Generation](/guides/bulk-content-generation)) |

<Tip>
  Using batch reduces your request count by up to 10x, leaving more rate limit headroom for other API calls. For high-volume workflows, see the [Bulk Content Generation](/guides/bulk-content-generation) guide.
</Tip>


## OpenAPI

````yaml POST /content/batch
openapi: 3.1.0
info:
  title: Hrizn Public API
  version: 1.2.0
  description: >
    The Hrizn Public API allows partners to programmatically create content,
    manage inventory descriptions, and integrate with the Hrizn platform.


    All endpoints are prefixed with `/public` and require an API key passed via
    the `X-API-Key` header (except the health check).
  contact:
    email: support@hrizn.io
servers:
  - url: https://api.app.hrizn.io/v1/public
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: IdeaClouds
    description: Create and manage AI-powered keyword research
  - name: Content Intelligence
    description: AI-powered content gap analysis and recommendations
  - name: Content
    description: Generate content from IdeaClouds
  - name: Compliance
    description: Run OEM compliance checks on content
  - name: Content Tools
    description: Generate SEO metadata, schemas, and social snippets
  - name: Inventory
    description: Access vehicle data and AI descriptions
  - name: Site
    description: View dealership details and configuration
  - name: Webhooks
    description: Manage webhook subscriptions for real-time events
  - name: Reference
    description: Look up available types, scopes, and events
  - name: Social
    description: >-
      Zernio-backed social posting and reviews across all connected platforms
      (X, Facebook, Instagram, LinkedIn, Google Business Profile)
  - name: Health
    description: Health check (no authentication)
paths:
  /content/batch:
    post:
      tags:
        - Content
      summary: Create content in batch
      description: Creates multiple content items in a single request (1-10 items).
      operationId: createContentBatch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateArticleBatchInput'
      responses:
        '202':
          description: Batch accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticleBatchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateArticleBatchInput:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/CreateArticleInput'
    ArticleBatchResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            items:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  status:
                    type: string
                  article_type:
                    $ref: '#/components/schemas/ArticleType'
                  title:
                    type: string
                  error:
                    type: string
                  created_at:
                    type: string
                    format: date-time
            message:
              type: string
              description: >-
                Informational message about async processing and webhook
                configuration
    CreateArticleInput:
      type: object
      required:
        - ideacloud_id
        - article_type
      properties:
        ideacloud_id:
          type: string
          format: uuid
        article_type:
          $ref: '#/components/schemas/ArticleType'
        selected_question_ids:
          type: array
          description: >
            Question IDs from the IdeaCloud (UUIDs from GET
            /ideaclouds/{id}/questions, or legacy `q-{timestamp}-{index}`
            format). Defaults to recommended questions.
          items:
            type: string
          minItems: 1
        brand_voice_id:
          type: string
        title:
          type: string
          maxLength: 500
        language:
          type: string
          enum:
            - English
            - Spanish
            - Mandarin Chinese
            - Japanese
            - Korean
            - Arabic
            - Farsi
            - Hebrew
            - French
            - Tagalog
            - Vietnamese
            - Portuguese
            - Russian
          default: English
          description: Language for generated content
        content_intent:
          type: string
          enum:
            - fixed_ops
            - variable
            - general
          default: general
          description: >-
            Controls which dealer links are injected inline vs. appended as a
            cross-department CTA. `fixed_ops` prioritizes service/parts links,
            `variable` prioritizes sales/financing links, `general` distributes
            all links evenly.
        auto_compliance:
          type: boolean
          default: false
        auto_content_tools:
          type: boolean
          default: false
        content_length:
          type: integer
          minimum: 200
          maximum: 5000
          deprecated: true
          description: >
            **Deprecated.** Article length is now driven by `content_depth`;
            this field is accepted for backward compatibility but has no effect
            on the generated output. Remove from your integration when
            convenient.
        content_depth:
          type: string
          enum:
            - concise
            - steady
            - balanced
            - substantial
            - in-depth
          description: >
            Content depth preset that drives the article body. Five ordered
            positions: `concise` (tight, direct prose), `steady` (efficient and
            on-point), `balanced` (default; lets the topic and outline drive
            depth), `substantial` (substantively developed with concrete
            examples), and `in-depth` (thorough exploration with vivid local
            color). Replaces the legacy `content_length` field.
    ArticleType:
      type: string
      enum:
        - basic
        - qa
        - expert
        - modellanding
        - comparison
        - salesevent
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: 'keyword: Required'
            details:
              type: object
            request_id:
              type: string
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: API key lacks required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Hrizn API key (prefix hzk_)

````