> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leadterra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/sdr/drafts/generate

> Generate an AI draft reply for a prospect thread.

Uses a multi-model pipeline (planner, draft, judge) to generate a reply. The draft incorporates thread context, knowledge base entries, SDR profile preferences, and follow-up rules.

```bash theme={null}
curl -X POST https://app.leadterra.co/v1/sdr/drafts/generate \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "threadId": "THREAD_ID",
    "variantCount": 1
  }'
```

## Request Body

<ParamField body="threadId" type="string" required>
  The prospect thread to generate a draft for.
</ParamField>

<ParamField body="instructions" type="string">
  Optional guidance for tone, content, or approach.
</ParamField>

<ParamField body="variantCount" type="number">
  Number of draft variants (1–3, default 1).
</ParamField>

## Response

```json theme={null}
{
  "data": {
    "drafts": [
      {
        "id": "draft_id",
        "bodyText": "Hi Ava, thanks for the reply...",
        "bodyHtml": "<p>Hi Ava, thanks for the reply...</p>",
        "subject": "Re: Quick question"
      }
    ],
    "insights": [
      {
        "draftId": "draft_id",
        "approach": "Direct response",
        "confidence": 0.85,
        "rationale": "Prospect asked about pricing"
      }
    ],
    "appliedRules": []
  }
}
```
