The assistant is Svanja’s built-in AI. It replies in Chat and handles the work you give it. These endpoints let you read chats and runs for the person who owns the API key. A run is a single attempt by the assistant to answer a message or complete a piece of work.
Use these endpoints to check what was asked and how much it cost. Rather than returning the full conversation, they give you summaries with short excerpts and usage details. Your API key needs the Assistant area, which is included in both Full access and Read-only keys. For more on how the assistant works, see Chat with the assistant.
Both endpoints use cursor-based pagination. To list the runs for a specific chat:
curl "https://app.svanja.com/api/v1/assistant/runs?chat_id=CHAT_ID" \
-H "Authorization: Bearer $SVANJA_API_KEY"
When meta.pagination.has_more is true, pass meta.pagination.next_cursor as the cursor parameter to get the next page. If you want to give the assistant work through the API, start a task.