Tiptap Shorthand

Tiptap Shorthand is a token-efficient format for representing Tiptap documents. It reduces AI token costs by up to 80% compared to standard JSON, without sacrificing accuracy.

Experimental feature

Tiptap Shorthand is currently an experimental feature.

Set up Tiptap Shorthand

Define the format in which the AI reads and edits the document by setting the format parameter of the JSON body. This parameter is available on all Server AI Toolkit endpoints.

The default value of format is "json". To enable Tiptap Shorthand, pass the format: "shorthand" parameter to all your API requests.

For example, to get the tool definitions:

curl -X POST https://api.tiptap.dev/v3/ai/toolkit/tools \
  -H "Content-Type: application/json" \
  -H "X-App-Id: YOUR_APP_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "format": "shorthand",
    "schemaAwarenessData": {}
  }'

No additional changes are required.

Format consistency

Use the same format value across all API calls in a conversation. Do not mix the json and shorthand formats within a single AI interaction.

Next steps

  • Read the API reference to see all available endpoints and their parameters.