Skip to main content
POST
Generate prompt suggestions
Starts a Prompt Studio generation. The request returns 202 with the generation and a Location header. Poll Get a suggestion generation, or subscribe an integration webhook to prompt_suggestions.ready and prompt_suggestions.failed. Generation uses no customer credits. It is limited to 3 workspace generations and 10 topic generations per workspace over a rolling 24 hours. At most one workspace generation and one generation per topic can run at a time. A request for the same running scope returns 409 RESOURCE_BUSY. Requires an active Business, Agency Business or Enterprise plan, and an API token with write access enabled by an Owner or Manager. See Writing data for activation, idempotency, conditional requests and error handling.
string
required
Bearer token for your team.
string
required
Unique key for this operation, at most 255 characters. Completed responses replay for 24 hours.
string
required
Workspace identifier. The workspace must belong to the token’s team.
string
default:"manual"
manual for the whole workspace, or topic for one topic.
string
Topic identifier. Required when source is topic.
boolean
default:"false"
Add suggestions to the current pool instead of starting over.

Response

Returns 202 with the generation.
string
Generation identifier
string
PENDING, RUNNING, COMPLETED or FAILED
string
manual, onboarding, topic or profile
string | null
Topic the generation targeted, when source is topic
integer | null
Number of recommended suggestions, once known
string
ISO 8601 creation time
string | null
ISO 8601 completion time, or null while the generation is in progress

Synthetic request and response

Errors

See Error codes for authentication, plan, idempotency and server errors. A token without write access returns 403 API_KEY_READ_ONLY. On 429, honor Retry-After. If the write limiter is unavailable or writes are suspended, the request returns 503 SERVICE_UNAVAILABLE and nothing changes.