AI generation
Generate text
Generates a text answer to q. With async: true, poll GET /aiResults/{id}. Without it, the answer comes in the request, which has a 30-second limit: a slow answer may still finish, be charged and appear in GET /aiResults.
driver | model | Credits per word |
|---|---|---|
openai (default) | gpt-6-luna (default), gpt-6.1-sol (premium) | 1, 10 |
claude | claude-haiku-5-5 (default), claude-sonnet-5-5 (premium) | 1, 10 |
deepseek | deepseek-v4-flash (default), deepseek-v4-pro | 2, 5 |
- Premium models need a plan with premium chat or the companyโs own key for that engine, or the driverโs default answers instead.
deepseekneeds one of the two (422). Retired IDs (gpt-4o,deepseek-chatโฆ) still work. The resultโsmodelshows who answered. - Cost: the answerโs words times the rate, from the planโs monthly AI words (
402,entitywords). In scripts without spaces, each character is a word. Withjson_schema, keys donโt count. - Conversations:
group_id(withcompany_id) sends the groupโs earlier turns as history. - With
async, a generation not started within 10 minutes fails.
The client role canโt generate.
POST
Authorizations
Body
application/json
The schema as a JSON-encoded string, not an object: {"name": "...", "strict": true, "schema": {...}}.
Example:
"{\"name\":\"hashtags\",\"strict\":true,\"schema\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"items\"],\"properties\":{\"items\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}}"
