Skip to main content
Use the Dari API to create agents, start durable sessions, send messages, and inspect session files.

Base URL

All endpoints are rooted at:
https://api.dari.dev/v1

Authentication

Send your API key in the Authorization header on every request:
Authorization: Bearer $DARI_API_KEY
Read Authentication for the full auth guide.

Core resources

Agents

Hosted agent definitions with a stable URL and version history.

Sessions

Durable conversations or tasks pinned to the agent version active at creation time.

Messages

Per-turn inputs and outputs for a session.

Files

Uploaded assets and session workspace files.

Choose a message mode

All three message endpoints create a message record under the same session. They differ only in how the HTTP request returns:
  • async: returns after the message is accepted and queued
  • sync: waits for a terminal message result
  • stream: returns incremental output over the same request
Read Send Message Async, Send Message Sync, and Send Message Stream for the request and response details.

Common flow

  1. Create or publish an agent.
  2. Create a session from that agent.
  3. Upload any files you want to reference in a message.
  4. Send a message to the session.
  5. Poll the session or inspect the session filesystem as needed.

Start with these endpoints