staqlydocs
REST APIAPI referenceMedia

Rewrite a short text with AI

Rewrite a short text with AI (media:write)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/ai/text

The design editor's text tools. The assistant's model (no tools) follows the instruction and answers with the new text only. Counts as AI usage.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Request Body

application/json
  1. body
text*string
Lengthlength <= 4000
instruction*string

What to do, e.g. Make it shorter, or Translate to German

Lengthlength <= 500

Response Body

OK

application/json
  1. response
text*string
Example Request
curl -X POST 'https://staqly.example.com/v1/ai/text' \  -H 'Content-Type: application/json' \  -d '{  "text": "string",  "instruction": "string"}'
Example Response
{  "text": "string"}