Skip to main content

AI Compose

POST/api/v1/mail/compose/assist

Overview

Use AI to write, rewrite, expand, or shorten email content. Powered by LiteLLM with model alias spideriq/chat.

Request Body

actionstringrequired

One of: write, rewrite, expand, shorten, formal, casual, fix_grammar

contextstring

Instructions or content to work with

subjectstring

Email subject for context

tonestring

Tone: professional, friendly, formal, casual (default: professional)

Request

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

ActionDescription
writeGenerate new email content from context
rewriteRewrite the provided content
expandMake content more detailed
shortenCondense content
formalAdjust to formal tone
casualAdjust to casual tone
fix_grammarFix grammar and spelling