Previewing Unsaved Edits

Use the public beta skill preview route to inspect stateless prompt composition before a model call.

POST /api/skills/:id/preview
Authorization: Bearer <accessToken or apiKey>
Content-Type: application/json

{
  "organizationId": "<orgId>",
  "skillVersionId": "<draftVersionId>",
  "variables": { "message": "hello" },
  "layers": [
    {
      "id": "draft-layer-1",
      "type": "task",
      "content": "Reply in one sentence.",
      "mode": "replace"
    }
  ]
}

This route is api_key_or_access_token. API keys need skills:read.

Use it when you want to:

  • preview a saved draft version with variables
  • preview unsaved layer edits without mutating server state
  • inspect renderedPrompt, compositionTrace, and missing-variable signals before execution

See also

Was this page helpful?