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

# Your first render

> End-to-end walkthrough from template to download

This guide walks through creating a personalized social card from scratch.

## 1. Design the template

In the dashboard, create a new template at 1080×1080 (Instagram square).

Add three layers:

1. **Background** — solid color or imported image
2. **Text** — name `headline`, mark as **dynamic**
3. **Image** — name `avatar`, mark as **dynamic**

Publish.

## 2. Trigger the render

```bash theme={null}
curl -X POST https://api.imtegrate.com/v1/images \
  -H "Authorization: Bearer $IMTEGRATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_abc",
    "modifications": [
      { "name": "headline", "text": "Welcome, Jane!" },
      { "name": "avatar", "image_url": "https://i.pravatar.cc/300?img=5" }
    ]
  }'
```

Response:

```json theme={null}
{
  "id": "img_xyz",
  "status": "pending",
  "template_id": "tpl_abc",
  "created_at": "2026-05-04T10:00:00Z"
}
```

## 3. Wait for completion

Poll every 2 seconds:

```bash theme={null}
until curl -s https://api.imtegrate.com/v1/images/img_xyz \
       -H "Authorization: Bearer $IMTEGRATE_API_KEY" \
       | jq -e '.status == "completed"' >/dev/null; do
  sleep 2
done
```

Or set `webhook_url` in the original POST to skip polling.

## 4. Download the result

The completed render has `result_url` — a signed URL valid for 1 hour. Re-fetch the render anytime to get a fresh URL.

```bash theme={null}
curl -o card.png "$(curl -s .../v1/images/img_xyz \
  -H 'Authorization: Bearer $IMTEGRATE_API_KEY' | jq -r .result_url)"
```

## Troubleshooting

| Symptom                         | Likely cause                                           |
| ------------------------------- | ------------------------------------------------------ |
| `400 invalid_modification`      | A `name` doesn't match a dynamic layer in the template |
| `403 template_not_published`    | Template exists but `is_published` is false            |
| Status stuck `pending` for >60s | Worker queue saturated — check status page             |
