Skip to content

Assemble the compiled prompt without calling the model

POST
/api/v1/ai/actions/assemble-prompt
curl --request POST \
--url https://app.avera.io/api/v1/ai/actions/assemble-prompt \
--header 'Content-Type: application/json' \
--data '{ "sampleSourceItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceItemType": "example", "systemPrompt": "example", "contextTree": "example", "allowedActionTypes": [ "ATTRIBUTE_EDIT" ], "createableItemTypes": [ "example" ], "editableAttributes": [ "example" ], "usableRelationshipTypes": [ "example" ], "maxContextTokens": 1 }'

Returns the fully compiled prompt (system prompt plus user prompt with slots filled) for a sample source item. The request carries the editor’s current draft fields, so unsaved edits are reflected and the draft need not be persisted. No model call is made, so it is free and not rate-limited.

Media typeapplication/json
object
sampleSourceItemId
required
string format: uuid
sourceItemType
required
string
systemPrompt
required
string
contextTree
required
string
allowedActionTypes
required
Array<string>
unique items
Allowed values: ATTRIBUTE_EDIT RELATIONSHIP_ADD RELATIONSHIP_REMOVE RELATIONSHIP_SET ITEM_CREATE ITEM_DELETE ITEM_REVISION_ABANDON ITEM_STATE_TRANSITION RELATIONSHIP_SUSPECT_CLEAR OBSERVATION_ADD LIVEDOC_EDIT LIVEDOC_SECTION_INSERT LIVEDOC_SECTION_REPLACE LIVEDOC_SECTION_DELETE LIVEDOC_CONTENT_APPEND LIVEDOC_ITEM_REFERENCE_INSERT LIVEDOC_ITEM_EMBED_INSERT QUERY_TABLE_INSERT RESPONSE_RECORD
createableItemTypes
required
Array<string>
unique items
editableAttributes
required
Array<string>
unique items
usableRelationshipTypes
required
Array<string>
unique items
maxContextTokens
required
integer format: int32

OK

Media type*/*
object
actionId
required
string
assembledSystemPrompt
required
string
assembledUserPrompt
required
string
slots
required
object
key
additional properties
string