AI Compose
POST
/api/v1/mail/compose/assistOverview
Use AI to write, rewrite, expand, or shorten email content. Powered by LiteLLM with model alias spideriq/chat.
Request Body
actionstringrequiredOne of: write, rewrite, expand, shorten, formal, casual, fix_grammar
contextstringInstructions or content to work with
subjectstringEmail subject for context
tonestringTone: professional, friendly, formal, casual (default: professional)
Request
- cURL
curl -X POST "https://spideriq.ai/api/v1/mail/compose/assist" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>" \
-d '{
"action": "write",
"context": "Reach out to prospect about enterprise plan pricing",
"tone": "professional"
}'
Response
{
"content": "<p>Dear prospect,</p><p>I'd like to introduce our enterprise plan...</p>",
"action": "write"
}
Actions
| Action | Description |
|---|---|
write | Generate new email content from context |
rewrite | Rewrite the provided content |
expand | Make content more detailed |
shorten | Condense content |
formal | Adjust to formal tone |
casual | Adjust to casual tone |
fix_grammar | Fix grammar and spelling |