Nurama Developers
AI

Convert a chat message into one or more board-task drafts.

Generates a list of `{ subject, description }` task drafts from a chat message. In the Nurama web app this backs the "Generate with Nu" option in a message's create-task menu; the returned `tasks` array seeds the task creator's draft list. **Compound capability requirement.** Unlike Polish, this endpoint requires BOTH the `boards` capability (checked against the project) and the `ai` capability (checked against the workspace); both `workspaceId` and `projectId` must belong to an active subscription. Either capability missing returns `capabilityNotAvailable`. **Context window.** `contextMessages` is the preceding chat thread (oldest first). The server caps at 10 messages and each entry's `content` at 8000 characters; supply the messages immediately before the focal one so the model can resolve pronouns and references. **Permission.** Requires `canAiGenerateTasks` (held by all workspace/project admins and by the creator, reviewer and reviewerAdmin roles). **Pre-prompt.** If the workspace or project has `aiTaskGenerationPreprompt` configured, it is appended to the system prompt as an override block (project value wins per-key). Separate from `aiCustomPreprompt` so admins can tune task style without affecting Polish or Chat output. Caps: - `messageText` is capped at 8000 characters. - `contextMessages` is capped at 10 entries; each entry's `content` is capped at 8000 characters and `authorName` at 100. - At most 10 tasks are returned.

POST
/ai/task-generation

Generates a list of { subject, description } task drafts from a chat message. In the Nurama web app this backs the "Generate with Nu" option in a message's create-task menu; the returned tasks array seeds the task creator's draft list.

Compound capability requirement. Unlike Polish, this endpoint requires BOTH the boards capability (checked against the project) and the ai capability (checked against the workspace); both workspaceId and projectId must belong to an active subscription. Either capability missing returns capabilityNotAvailable.

Context window. contextMessages is the preceding chat thread (oldest first). The server caps at 10 messages and each entry's content at 8000 characters; supply the messages immediately before the focal one so the model can resolve pronouns and references.

Permission. Requires canAiGenerateTasks (held by all workspace/project admins and by the creator, reviewer and reviewerAdmin roles).

Pre-prompt. If the workspace or project has aiTaskGenerationPreprompt configured, it is appended to the system prompt as an override block (project value wins per-key). Separate from aiCustomPreprompt so admins can tune task style without affecting Polish or Chat output.

Caps:

  • messageText is capped at 8000 characters.
  • contextMessages is capped at 10 entries; each entry's content is capped at 8000 characters and authorName at 100.
  • At most 10 tasks are returned.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/ai/task-generation" \  -H "Content-Type: application/json" \  -d '{    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",    "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",    "messageText": "string"  }'
{  "tasks": [    {      "subject": "Draft launch checklist",      "description": "List every step needed before go-live."    },    {      "subject": "Notify stakeholders",      "description": "Email the launch plan to leadership."    }  ],  "billedCredits": 4,  "balanceAfter": 9996,  "eventId": "0193e4a1-b2c3-7000-8000-00000000abcd"}