Generate script from intent
Draft a complete script from a description of the conversational goal. Does not create a project. The draft uses every block type (rating, NPS, ranking, calculated fields, action blocks), scoring and show_when; it is fixed in code, failing blocks get one repair call, and blocks that still fail are dropped and listed in dropped (except a misspelled score bucket: that block is kept and listed in flagged). The returned blocks pass PUT /script as they are. Typical workflow: (1) POST /projects/generate; (2) read author_notes; (3) POST /projects with script: {blocks} (and scoring_enabled: true when scoring.enabled). Or use POST /projects with intent to draft and write in one call. Optionally call POST /projects/generate/plan first. Every model call is charged, repairs included. Returns 402 if the balance is below the chosen quality's floor.
Request
- Base URL: https://api.subo.ai
- URL: https://api.subo.ai/v1/communities/{communityId}/projects/generate
- Auth: API key in header X-API-Key
Path parameters
Community ID (Discord guild snowflake, serialized as string)
Request body
Example request
{
"intent": "Measure how satisfied members are with last week's event",
"language": "fr",
"admin_language": "en"
}Response
The draft: blocks (pass to PUT /script or POST /projects as they are) and what came with it
Changes
No recorded changes to this operation across all 1 revision of this API.