# Social square template

> A square or 4:5 feed post with a large headline, short body, handle, and call to action. Render it on-brand from an AI agent or the REST API.

Canonical URL: https://vectorfast.ai/render/templates/social-square
Markdown URL: https://vectorfast.ai/render/templates/social-square.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: `social-square` (pin the major version as `social-square@1`; current version 1.0.0)
- Sizes: 1080×1080, 1080×1350 (default 1080×1080)
- Formats: PNG, JPEG, WebP
- Use it for: Instagram and LinkedIn feed posts; Announcement squares an agent makes from a sentence; Event and webinar promos

## Previews
- English: ![Social square template rendered in English at 1080×1080 with the built-in VectorFast brand kit.](https://vectorfast.ai/i/social-square.png?body=Connect%20once%2C%20pick%20a%20template%2C%20pass%20the%20copy.%20Every%20render%20matches%20the%20brand%20kit.&brand=default&cta=Join%20the%20waitlist&h=1080&handle=%40vectorfast&headline=Your%20agent%20now%20ships%20on-brand%20images&w=1080&sig=xDd9hNl88sWdQoXXS_FPAtFGkQfrhl47z1AVsMPYh8w)
- Chinese: ![Social square template rendered in Chinese at 1080×1080 with the built-in VectorFast brand kit.](https://vectorfast.ai/i/social-square.png?body=%E8%BF%9E%E6%8E%A5%E4%B8%80%E6%AC%A1%EF%BC%8C%E9%80%89%E4%B8%AA%E6%A8%A1%E6%9D%BF%EF%BC%8C%E6%8A%8A%E6%96%87%E6%A1%88%E4%BC%A0%E8%BF%9B%E6%9D%A5%EF%BC%8C%E6%AF%8F%E4%B8%80%E5%BC%A0%E9%83%BD%E7%AC%A6%E5%90%88%E5%93%81%E7%89%8C%E8%A7%84%E8%8C%83%E3%80%82&brand=default&cta=%E5%8A%A0%E5%85%A5%E5%80%99%E8%A1%A5%E5%90%8D%E5%8D%95&h=1080&handle=%40vectorfast&headline=%E4%BD%A0%E7%9A%84%20agent%20%E7%8E%B0%E5%9C%A8%E8%83%BD%E7%9B%B4%E6%8E%A5%E5%87%BA%E5%93%81%E7%89%8C%E5%9B%BE%E4%BA%86&w=1080&sig=vkCpSAFzvn0hg2bRE0ZUSKX862k471sRO4aw-LOmDdM)

## 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 | Large headline. |
| `body` | string | no | ≤ 160 chars | Short supporting copy. |
| `handle` | string | no | ≤ 40 chars | Account handle such as "@vectorfast". |
| `cta` | string | no | ≤ 30 chars | Button text. |

## Ask an agent
Prompt:

> Make a 4:5 Instagram portrait post announcing that agents can now ship on-brand images, signed @vectorfast, with a "Join the waitlist" button.

The MCP `render` tool call it should become:

```json
{
  "name": "render",
  "arguments": {
    "template": "social-square",
    "params": {
      "headline": "Your agent now ships on-brand images",
      "body": "Connect once, pick a template, pass the copy.",
      "handle": "@vectorfast",
      "cta": "Join the waitlist"
    },
    "width": 1080,
    "height": 1350
  }
}
```

## REST
```bash
curl https://vectorfast.ai/v1/renders \
  -H "Authorization: Bearer $VECTORFAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "template": "social-square@1",
  "format": "png",
  "width": 1080,
  "height": 1350,
  "params": {
    "headline": "Your agent now ships on-brand images",
    "body": "Connect once, pick a template, pass the copy.",
    "handle": "@vectorfast",
    "cta": "Join the waitlist"
  }
}'
```

## 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: 'social-square',
  format: 'png',
  width: 1080,
  height: 1350,
  params: {
    "headline": "Your agent now ships on-brand images",
    "body": "Connect once, pick a template, pass the copy. Every render matches the brand kit.",
    "handle": "@vectorfast",
    "cta": "Join the waitlist"
  },
})
```

## FAQ
### Which sizes does the social-square template support?
1080×1080, 1080×1350. The default is 1080×1080; 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
