AI

Draft email text with the AI gateway.

Guides: AI.

MethodPathOperationScope
POST/v1/ai/draftDraft email text with AIwrite

Draft email text with AI

POST
/v1/ai/draft

Runs against the live API with the key you enter: this change really happens. Use a key limited to a test account.

Writes an email body from instructions, optionally answering a message or reworking a draft, in plain text or Markdown. Nothing is sent or saved: the text is for a person to edit. Needs the write scope; drafts are held to a per-minute limit (beyond it, rate_limited with Retry-After).

Required scope: write.

Request Body

application/json
  1. body
instructions*string
Length1 <= length <= 2000
context?
format*AiDraftFormat
Value in"text""markdown"

Response Body

OK

application/json
  1. response
text*string
Example Request
curl -X POST 'https://api.workwae.com/v1/ai/draft' \  -H 'Content-Type: application/json' \  -d '{  "instructions": "string",  "format": "text"}'
Example Response
{  "text": "string"}