llms.txt

Constraints

Snaps enforce strict limits to ensure every valid page fits within a ~500px feed card and renders consistently across clients.

Response Constraints Summary

ConstraintLimit
Elements per pageMax 5
Media elements per pageMax 1 (image or grid)
Buttons per pageMax 4
Title textMax 80 chars
Body textMax 160 chars
Caption textMax 100 chars
Label textMax 40 chars
Button labelMax 30 chars
Text input max lengthMax 280 chars
List itemsMax 4
Button group optionsMin 2, max 4
Group childrenMin 2, max 3. No media, no nested groups
Bar chart barsMin 1, max 6
Grid dimensionsMin 2x2, max 64 cols x 8 rows
POST response timeout5s

Height-Enforced Element Constraints

These constraints apply to every page, not just the first. They are designed so that any valid combination of elements fits within the 500px feed card height (including padding and buttons).

ConstraintLimitRationale
Elements per pageMax 5Prevents vertical overflow
Media elements per pageMax 1 (image or grid)Media elements are tall; only one per page
Body textMax 160 chars~4 lines, ~80px
Caption textMax 100 chars~2 lines, ~36px
List itemsMax 4~120px total
Button group optionsMax 4~100px stacked
Grid rowsMax 8Keeps the page within the feed card height

Snaps that need longer text, bigger grids, or more list items can spread content across multiple pages via post buttons, or link to a Farcaster mini app for the full experience.

Validation

A valid snap page must pass these checks:

Schema Validation (at render time)

  • JSON conforms to the page schema
  • All required fields present
  • All field values within allowed ranges and types
  • Element count within limits (max 5, max 1 media element)
  • Button count within limits (max 4)
  • Text lengths within limits per element type
  • Grid dimensions within limits (max 64 cols x 8 rows)
  • Version field matches a supported version

URL Validation (at publish time)

  • For post, link, and mini_app buttons, target must use HTTPS. Exception for local development: http:// is allowed when the host is loopback only (localhost, 127.0.0.1, or [::1])
  • Snap URL responds with valid page JSON
  • No javascript: URIs

If schema validation fails at render time, the snap does not render (falls back to plain link in cast text). No LLM evaluation is required.