For the complete documentation index, see llms.txt. This page is also available as Markdown.

Compute and render a document from a structured content source

Server-renders a document from a provided content source definition, evaluating template expressions and resolving variables to produce a fully computed document. Use this to preview how dynamic content will look without publishing a full revision.

Available in MCP
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
schemastring · enumOptional

Version of the schema used for the document.

Possible values:
Body
sourceone ofRequired
or
or
seedstringRequired

Seed to use for the generation of IDs.

Responses
200

Document computed

application/json
objectstring · enumRequiredPossible values:
post/spaces/{spaceId}/content/computed/document
POST /v1/spaces/{spaceId}/content/computed/document HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "source": {
    "type": "builtin:openapi",
    "dependencies": {
      "spec": {
        "ref": {
          "kind": "openapi",
          "spec": "text"
        }
      }
    },
    "props": {
      "doc": "models"
    }
  },
  "seed": "text"
}
200

Document computed

{
  "object": "document",
  "data": {},
  "nodes": [
    {
      "object": "block",
      "type": "paragraph",
      "data": {},
      "nodes": [
        {
          "object": "text",
          "leaves": [
            {
              "object": "leaf",
              "text": "Hello world",
              "marks": []
            }
          ]
        }
      ]
    }
  ]
}

Last updated

Was this helpful?

Powered by GitBook