---
title: "Generate AI subject lines for many leads (async batch)"
method: POST
path: "/v1/ai/subject/batch"
tags: ["AI Personalization"]
---

# Generate AI subject lines for many leads (async batch)

`POST /v1/ai/subject/batch`

Identical contract to `POST /v1/ai/hook/batch` but produces subject lines. The worker bills 3 credits per successful lead.

## Request body

- AiBatchRequest
  - `leads` AiVariableGenerateRequest[], required
    - `leadId` string, uuid, required — The lead to generate for. Must belong to the caller.
    - `locale` string — Output locale (one of the 8 supported locales).
    - `mode` 'native' | 'translate' — `native` generates directly in the target locale; `translate` generates in English then translates.

## Response `200`

Batch job created

- AiBatchResponse
  - `success` boolean
  - `data` object
    - `jobId` string, uuid
    - `status` string
    - `pollUrl` string
    - `estimatedCost` AiCost
      - `credits` integer
      - `pence` integer

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `402` — Insufficient credit balance for the request (or whole batch).
- `429` — Rate limit exceeded (1000 requests/hour/key).

---

[API](https://skmtc.net/meirra/apis/meirra-api.md) · [All operations](https://skmtc.net/meirra/apis/meirra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/meirra/meirra-api/versions/d6c1805fc561/schema)
