Tessen Docs

Executions

An execution is a plan: a goal, the stages Tessen chose for it, and the state of each. Creating one returns immediately with the plan — the work runs after the response.

POST/api/execution

Start an execution, or resume one that stopped at an approval gate.

Session cookie, or an API key carrying the build scope.

Body

FieldTypeRequiredDescription
goalstringyesWhat you want, in words. Between 8 and 2000 characters.
outcome"website" | "ebook"noWhat is being made. Defaults to "website". Anything unrecognised falls back to the default rather than erroring.
planIdstringnoResume this plan instead of starting a new one. When present, goal and outcome are ignored.
approvestring[]noStage ids to approve on a resume. Unknown ids are dropped.

Request

curl -X POST https://cloud.tessen.ai/api/execution \
  -H "Authorization: Bearer tsn_cloud_EXAMPLE" \
  -H "content-type: application/json" \
  -d '{"goal":"a one-page site for a bakery in Lisbon","outcome":"website"}'

Response

HTTP/1.1 202 Accepted

{
  "plan": {
    "id": "<plan id>",
    "goal": "a one-page site for a bakery in Lisbon",
    "project": null,
    "status": "running",
    "progress": 0,
    "resumable": false,
    "warning": null,
    "previewUrl": null,
    "publishedUrl": null,
    "stages": [
      { "id": "understand", "title": "...", "state": "running", "attempts": 1, "error": null }
    ]
  },
  "unavailable": []
}

Errors

StatusWhen
400The body was not JSON, or the goal was shorter than 8 or longer than 2000 characters.
401No session and no valid key.
403The key does not carry the build scope.
404A planId was given that is not yours or does not exist.
429Your generation limit for the window is reached.
503No stage for that outcome can run here. The body names which outcomes are unavailable rather than the missing credential.
202, not 200. The plan row is written and the response returns before any stage finishes — so the id is watchable from the first millisecond and a crash mid-run is resumable. `unavailable` is reported rather than silently trimmed.

GET/api/execution

Read one of your plans, or your ten most recent.

Session cookie, or an API key carrying the read scope.

Query parameters

NameTypeRequiredDescription
idstringnoA plan id. Omit to list your ten most recent plans.

Request

curl "https://cloud.tessen.ai/api/execution?id=<plan id>" \
  -H "Authorization: Bearer tsn_cloud_EXAMPLE"

Response

HTTP/1.1 200 OK

{ "plan": { "id": "...", "status": "...", "progress": 0, "stages": [] } }

Errors

StatusWhen
401No session and no valid key.
404No plan with that id belongs to you. Indistinguishable from one that never existed, deliberately.