# POST /ai/generate-pipeline

**Resource:** [AI](./ai.md)  
**Scopes:** `ai:use`  
**Write operation:** yes

Auto-generate a pipeline structure with stages from a text description. Costs 3 credits.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `description` | body | string | yes | Description of the business/sales process |
| `business_type` | body | string | no | Type of business (e.g. "B2B SaaS", "retail") |
| `industry` | body | string | no | Industry for tailored stage suggestions |
| `success_criteria` | body | string | no | What makes a deal "won" |
| `lost_criteria` | body | string | no | What makes a deal "lost" |
| `additional_context` | body | string | no | Any other relevant context |

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`