API referenceFormulas

Author a formula

A formula is a look expressed as INGREDIENTS in a row, linted at write, instead of a code drop.

Two systems carry them and this is the one place to see and write both.

slot bug — the brand mark's motion. spec is {recipe, params} over three carriers: entry-exit, beat-envelope and trigger-lift; on names a ruler (bar, beat, 2beat, hit, cam). You choose the slug. The row is born held and reaches no render until it is promoted to active. A spec that could strobe or reach outside its own element is refused (422).

slot caption — how words move: entry/life/exit/field ingredients. The id is MINTED from the title, because the renderer keys the compiled template on the row id, so a slug is not honoured and the reply carries the id that was used. Saved private; reaching the shared catalog is moderated rather than a status flip.

Both are validated by composing the real thing and checking what comes out, not by matching a schema: either grammar can be valid JSON and still name an ingredient that does not exist, which renders as a duller look with no error anywhere.

POST
/formulas

Authorization

bearerAuth
AuthorizationBearer <token>

Typecut API key. Generate one in app.typecut.ai → Settings → API keys. Send as Authorization: Bearer tc_live_….

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/formulas" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "spec": {      "recipe": "beat-envelope",      "params": {        "on": "beat",        "to": 0.04,        "attack": 0.05,        "decay": 0.2      }    }  }'
{
  "data": {
    "slot": "bug",
    "slug": "string",
    "title": "string",
    "hint": "string",
    "spec": {
      "property1": null,
      "property2": null
    },
    "status": "held",
    "tiers": [
      "string"
    ],
    "built_in": true,
    "emitted": {
      "property1": 0,
      "property2": 0
    }
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}