---
title: "Generate Prompt Suggestions"
method: POST
path: "/prompts/suggestions/generate"
tags: ["Project"]
---

# Generate Prompt Suggestions

`POST /prompts/suggestions/generate`

## Request

- Base URL: `https://api.peec.ai/customer/v1`
- URL: `https://api.peec.ai/customer/v1/prompts/suggestions/generate`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in query parameter `api_key`
  - HTTP bearer

Generate Prompt Builder suggestions for a project, the same way the Prompt Builder does. Generation runs in the background: this returns its generation ID as soon as it is queued. Poll `GET /prompts/suggestions/generations/{generation_id}` until it succeeds or fails, then list successful results with `GET /prompts/suggestions?legacy=false`. `topic_id`, `prompt_suggestion_id` and `segment` each narrow the run and are mutually exclusive; with an empty body every topic awaiting review is generated for again, replacing its current suggestions. The project's branding/intent split has to be configured first, with `PUT /project-profile` — generation has nothing to run against without it. Markets are optional: without them the project's own country and language are used. A project gets one full run of suggestions a day, sized as every topic, market, branding and intent combination at 10 prompts each. Once the project has queued that many, the request returns 429 with the time to retry.

## Request body

- object
  - `topic_id` string: Generates for this topic alone instead of every topic awaiting review, replacing the suggestions it already has.
  - `prompt_suggestion_id` string: Replaces this one Prompt Builder suggestion, keeping its id, topic and market.
  - `segment` object: Adds suggestions for one slice of a topic, keeping the suggestions it already has. Any dimension left unset is filled from the project's target distribution and markets.
    - `topic_id` string, required
    - `branding` 'branded' | 'non-branded'
    - `intent` 'informational' | 'commercial' | 'transactional'
    - `persona_tag_id` string
    - `country` 'AE' | 'AL' | 'AM' | 'AR' | 'AT' | 'AU' | 'BA' | 'BE' | 'BG' | 'BH' | 'BO' | 'BR' | 'BS' | 'BY' | 'CA' | 'CH' | 'CL' | 'CN' | 'CO' | 'CR' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DO' | 'EC' | 'EE' | 'EG' | 'ES' | 'FI' | 'FR' | 'GB' | 'GE' | 'GH' | 'GR' | 'GT' | 'HK' | 'HN' | 'HR' | 'HU' | 'ID' | 'IE' | 'IL' | 'IN' | 'IQ' | 'IS' | 'IT' | 'JO' | 'JP' | 'KR' | 'KW' | 'LB' | 'LI' | 'LT' | 'LU' | 'LV' | 'MA' | 'MD' | 'ME' | 'MK' | 'MN' | 'MT' | 'MX' | 'MY' | 'NG' | 'NI' | 'NL' | 'NO' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PE' | 'PH' | 'PL' | 'PT' | 'PY' | 'PS' | 'QA' | 'RO' | 'RS' | 'SA' | 'SE' | 'SG' | 'SI' | 'SK' | 'SV' | 'TH' | 'TN' | 'TR' | 'TW' | 'UA' | 'US' | 'UY' | 'VE' | 'VN' | 'ZA' | 'AD' | 'AF' | 'AS' | 'AZ' | 'BB' | 'BQ' | 'CG' | 'CI' | 'CM' | 'CW' | 'DM' | 'DZ' | 'FO' | 'GF' | 'GP' | 'JM' | 'KG' | 'KH' | 'KI' | 'KZ' | 'LK' | 'LR' | 'LS' | 'MW' | 'NC' | 'PG' | 'TD' | 'TF' | 'UG' | 'VU' | 'ZW': Must be one of the project's markets, or its own country when it has none.
    - `count` integer

## Response `200`

Generation queued

- object: Generation queued
  - `generation_id` string, uuid, required: The generation to poll with GET /prompts/suggestions/generations/{generation_id}.
  - `topic_id` string: The topic being generated when the request scoped the run to one topic or suggestion.

## Other responses

- `400`: Response for status 400
- `404`: Response for status 404
- `429`: Response for status 429

## Changes

- **2026-11-03** `9fdffdff48a5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/peec/apis/peec-ai-customer-api/changes/prompts/suggestions/generate/post.md)

---

[API](https://skmtc.dev/peec/apis/peec-ai-customer-api.md) - [All operations](https://skmtc.dev/peec/apis/peec-ai-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/peec/apis/peec-ai-customer-api/revisions/9d774600c8eb?raw)
