# Invite card template

> An invitation or referral card with the inviter, a code on a ticket stub, and a call to action. Render it on-brand from an AI agent or the REST API.

Canonical URL: https://vectorfast.ai/render/templates/invite-card
Markdown URL: https://vectorfast.ai/render/templates/invite-card.md
Last modified: 2026-10-30

VectorFast Render is in early access: billing is not connected yet, and API keys are issued to waitlist members as access opens.

## Summary
- Template id: `invite-card` (pin the major version as `invite-card@1`; current version 1.0.0)
- Sizes: 1200×630, 1080×1080 (default 1200×630)
- Formats: PNG, JPEG, WebP
- Use it for: Referral programs; Team and workspace invitations; Beta access codes

## Previews
- English: ![Invite card template rendered in English at 1200×630 with the built-in VectorFast brand kit.](https://vectorfast.ai/i/invite-card.png?brand=default&code=TEAM-42&cta=Accept%20invite&expires=Expires%20Nov%2030&h=630&headline=Join%20the%20team%20on%20VectorFast%20Render&inviter_name=Mia%20Chen&w=1200&sig=Ls6_i-73Gwm_uZdDNo-202k6dzWHPfyrwMjaue2W4sg)
- Chinese: ![Invite card template rendered in Chinese at 1200×630 with the built-in VectorFast brand kit.](https://vectorfast.ai/i/invite-card.png?brand=default&code=TEAM-42&cta=%E6%8E%A5%E5%8F%97%E9%82%80%E8%AF%B7&expires=11%20%E6%9C%88%2030%20%E6%97%A5%E5%89%8D%E6%9C%89%E6%95%88&h=630&headline=%E9%99%88%E7%B1%B3%E5%A8%85%E9%82%80%E8%AF%B7%E4%BD%A0%E5%8A%A0%E5%85%A5%E5%9B%A2%E9%98%9F%EF%BC%8C%E4%B8%80%E8%B5%B7%E5%87%BA%E5%93%81%E7%89%8C%E5%9B%BE&inviter_name=%E9%99%88%E7%B1%B3%E5%A8%85&w=1200&sig=-MxcQKGS379BlBbo7Q3g9ZTfafqv6EhZP38J69cYB2M)

## Parameters
All string params are trimmed. Limits come from the schema `POST /v1/renders` validates.

| Param | Type | Required | Limit | Notes |
| --- | --- | --- | --- | --- |
| `headline` | string | yes | ≤ 90 chars | Invitation headline. |
| `inviter_name` | string | no | ≤ 40 chars | Who sent the invite. |
| `code` | string | no | ≤ 16 chars | Referral or access code on the ticket stub. |
| `cta` | string | no | ≤ 30 chars | Button text. |
| `expires` | string | no | ≤ 30 chars | Free text such as "Valid until Nov 30". |

## Ask an agent
Prompt:

> Make a referral card Ana Lima can send to friends: "Ana invited you to VectorFast Render", code ANA-2026 good until November 30, and a "Claim 100 free renders" button.

The MCP `render` tool call it should become:

```json
{
  "name": "render",
  "arguments": {
    "template": "invite-card",
    "params": {
      "headline": "Ana invited you to VectorFast Render",
      "inviter_name": "Ana Lima",
      "code": "ANA-2026",
      "cta": "Claim 100 free renders",
      "expires": "Valid until Nov 30"
    }
  }
}
```

## REST
```bash
curl https://vectorfast.ai/v1/renders \
  -H "Authorization: Bearer $VECTORFAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "template": "invite-card@1",
  "format": "png",
  "width": 1200,
  "height": 630,
  "params": {
    "headline": "Ana invited you to VectorFast Render",
    "inviter_name": "Ana Lima",
    "code": "ANA-2026",
    "cta": "Claim 100 free renders",
    "expires": "Valid until Nov 30"
  }
}'
```

## Signed URL (server-side Node.js)
Per-key signing secrets are not issued yet in early access; until then, reuse the signed `url` that `POST /v1/renders` returns. The algorithm below is what the server verifies. Keep the secret on your server.

```js
import { createHmac } from 'node:crypto'

// Server-side only. Never ship the signing secret to a browser, a mobile app or a repo.
const SIGNING_SECRET = process.env.VECTORFAST_SIGNING_SECRET

function encode(value) {
  return encodeURIComponent(value).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase())
}

export function signRenderUrl({ template, format = 'png', params, brand, width, height, keyId }, secret = SIGNING_SECRET) {
  const query = {}
  for (const [key, value] of Object.entries(params)) {
    if (value === undefined || value === null)
      continue
    query[key] = typeof value === 'string' ? value : Array.isArray(value) ? JSON.stringify(value) : String(value)
  }
  if (brand) query.brand = brand
  if (keyId) query.k = keyId
  if (width) query.w = String(width)
  if (height) query.h = String(height)

  const canonical = Object.entries(query)
    .map(([key, value]) => [encode(key), encode(value)])
    .sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0))
    .map(([key, value]) => key + '=' + value)
    .join('&')
  const path = '/i/' + template + '.' + format
  const sig = createHmac('sha256', secret).update(path + '?' + canonical).digest('base64url')
  return 'https://vectorfast.ai' + path + '?' + (canonical ? canonical + '&' : '') + 'sig=' + sig
}

const url = signRenderUrl({
  template: 'invite-card',
  format: 'png',
  width: 1200,
  height: 630,
  params: {
    "headline": "Join the team on VectorFast Render",
    "inviter_name": "Mia Chen",
    "code": "TEAM-42",
    "cta": "Accept invite",
    "expires": "Expires Nov 30"
  },
})
```

## FAQ
### Which sizes does the invite-card template support?
1200×630, 1080×1080. The default is 1200×630; pass width and height to pick another supported size.

### Which parameters are required?
headline. Every other parameter is optional and has a rendering default.

### Does rendering the same parameters twice cost twice?
No. The same template version, parameters, brand kit version, format, and size produce the same cache key, so a repeat request is served from cache instead of rendering again. Billing is not connected yet in early access.

## Related
- All templates: https://vectorfast.ai/render/templates
- Template reference: https://vectorfast.ai/render/docs/templates
- Connect Claude: https://vectorfast.ai/render/agents/claude
