# AI Email Draft Generator

> AI Email Draft Generator is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Generates complete email drafts (subject, body, salutation, sign-off) across 10 email types and 7 tones with length controls

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/email-draft
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-52831fac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f_acEN0o0NsTZJWvs_mri

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-deployer-x402-deployer-workers-dev-52831fac -d '<json body>'
```

Example prompt: Draft a cold outreach email in a persuasive tone to 'Sarah Chen' from 'Alex Rivera at Acme Corp' — medium length — introducing our SaaS analytics platform and asking for a 20-minute discovery call.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically generate complete, ready-to-send emails with structured output (subject + body + salutation + sign-off) across a wide variety of business scenarios. Prefer this over generic LLM prompting when you need consistent email structure, specific tone controls, and support for defined email types like cold_outreach, follow_up, decline, apology, or internal_update.

## Known failure modes

- Invalid email type value returns 400 error
- Unsupported tone value returns 400 error
- Missing required context fields returns incomplete or generic draft
- Payment not included or insufficient USDC returns 402 Payment Required
- Empty or missing body parameters returns 422 Unprocessable Entity

## How this service works

AI email writer / cold outreach / follow-up generator. Subject + body + salutation + sign-off. 7 tones × 10 email types (cold_outreach, follow_up, decline, reply, internal_update, thank_you, intro, request, apology, general). Length controls.

## Output

A fully composed email including subject line, salutation, body paragraphs, and sign-off, tailored to the specified email type (e.g. cold_outreach, follow_up), tone (e.g. formal, friendly, persuasive), and length setting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "prompt"
     ],
     "properties": {
      "cta": {
       "type": "string",
       "description": "Optional. Call to action to include, e.g. 'schedule a call this week'."
      },
      "tone": {
       "type": "string",
       "description": "Optional. formal, casual, friendly (default), warm, direct, apologetic, or enthusiastic."
      },
      "length": {
       "enum": [
        "very_short",
        "short",
        "medium",
        "long"
       ],
       "type": "string",
       "description": "Optional. very_short, short, medium (default, ~80-150 words), or long (~150-300 words)."
      },
      "prompt": {
       "type": "string",
       "description": "Brief describing the email's goal and context. Max 4,000 chars."
      },
      "email_type": {
       "type": "string",
       "description": "Optional. cold_outreach, follow_up, decline, reply, internal_update, thank_you, introduction, request, apology, or general (default)."
      },
      "sender_name": {
       "type": "string",
       "description": "Optional. Sender's name for the sign-off. Defaults to a '[Your name]' placeholder."
      },
      "recipient_name": {
       "type": "string",
       "description": "Optional. Recipient's name, used in the salutation."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "body": {
       "type": "string"
      },
      "subject": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-52831fac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
