---
title: "Generate content for prompts"
method: POST
path: "/api/v1/content/generate"
tags: ["Content"]
---

# Generate content for prompts

`POST /api/v1/content/generate`

## Request

- Base URL: `https://app.promptingco.com`
- URL: `https://app.promptingco.com/api/v1/content/generate`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

Start the content-generation agent for one or more prompts. Each prompt gets a draft (returned with its `draftId` and `runId`); generated content lands in the review queue as `pending_review`, never published directly. Poll `GET /api/v1/content/{draftId}` until `generationStatus` is `completed` or `failed`.

## Request body

- object
  - `productId` string: Product ID. Provide exactly one of `productId` or `productSlug`.
  - `productSlug` string: Product slug. Provide exactly one of `productId` or `productSlug`.
  - `promptIds` string[], required: Prompts to generate content for. Prompt text is loaded server-side; ids must belong to the product.
  - `contentType` 'recommended' | 'solution-recommendation' | 'comparison' | 'explainer' | 'implementation-guide' | 'decision-guide' | 'use-case-workflow' | 'listicle' | 'solution-guide' | 'code-example' | 'code-decision-guide' | 'compatibility' | 'faq' | 'custom'
  - `customRuleDocPath` string
  - `brandPositioning` 'soft-sell' | 'hard-sell' | 'neutral'
  - `systemPrompt` string

## Response `200`

Successful response

- object
  - `ok` true, required
  - `data` object, required
    - `scope` object, required
      - `product` object, required
        - `id` string, required
        - `name` string, required
        - `slug` string, nullable, required
      - `organization` object, required
        - `id` string, required
        - `name` string, required
        - `slug` string, required
    - `count` integer, required: Drafts whose generation run started successfully.
    - `drafts` object[], required
      - `draftId` string, required
      - `promptId` string, required: The prompt this draft was generated for.
      - `runId` string, required: Agent run id; empty when the Temporal launch failed.
      - `title` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `422`: Validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api.md) - [All operations](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/revisions/c0451ea10e9a?raw)
