Keys are created on the API keys page. The token is shown exactly once, when the key is created, and cannot be read back afterwards -- only its hash is stored. Copy it then.
Start a chat
A chat is a conversation. It starts with every response policy switched on, which is what makes the decision model answer for each message. The name is optional: a chat with no name takes its title from the first message it is given.
The answer carries the chat's id. Keep it: every other request names it.
Send a message
Send a message and wait. The reply arrives whole, with the decision turn that informed it. In the app this is streamed, because a browser has somewhere to be pushed to and a request does not.
POST
/api/v1/chats/:chatId/messages
Exampleshell
curl -X POST "$QUIRK_API_URL/api/v1/chats/$CHAT_ID/messages" \
-H "Authorization: Bearer $QUIRK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Should I ship this on Friday?"}'
The answer is the message as saved, the reply, and the turn:
The reference pages cover every endpoint and every field. If you would rather send requests from a page than from a terminal, the API playground runs the same requests with one of your keys and never puts the key in the browser.