Project

Generate Prompt Suggestions

Changed on

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.

post/prompts/suggestions/generate

Request

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

Request body

topic_idstring

Generates for this topic alone instead of every topic awaiting review, replacing the suggestions it already has.

prompt_suggestion_idstring

Replaces this one Prompt Builder suggestion, keeping its id, topic and market.

Example request

{
  "topic_id": "to_e6b8cdd3-a51b-4d94-a866-28dbe6b830a6",
  "prompt_suggestion_id": "pr_93f790de-5b7a-45ee-b782-61103c81f20d"
}

Response

Generation queued

generation_idstring uuid required

The generation to poll with GET /prompts/suggestions/generations/{generation_id}.

topic_idstring

The topic being generated when the request scoped the run to one topic or suggestion.

Changes