D
Damira AI

API Reference

Connect to Damira AI via API — authentication, endpoints, and integration examples.

Use the Damira API directly from scripts, CI pipelines, or any HTTP client. The same API powers the VS Code extension.

Damira API — Python code example calling the agent endpoint

Prerequisites

  • Tier: Any (Free tier has limited endpoints)
  • API key from your Damira account

Authentication

Every request needs an API key in the X-API-Key header.

API Key Formats

FormatSourceExample
damira_sk_*User dashboarddamira_sk_a1b2c3d4e5f6
dm_<tier>_*Internal/servicedm_pro_abc123

Getting Your Key

  1. Sign in at damiraai.com
  2. Go to Dashboard → API Keys
  3. Click Generate Key
  4. Copy it — you won't see it again

Sign in to Damira — Google OAuth or email/password

Setting Your Key in VS Code

  1. Open Command Palette (Cmd+Shift+P)
  2. Type "Damira: Set API Key"
  3. Paste your key
  4. Or: go to Damira sidebar → Settings → API Key field

Core Endpoints

Chat (Streaming)

curl -X POST https://api.damiraai.com/agent/chat \
  -H "X-API-Key: damira_sk_yourkey" \
  -H "Content-Type: application/json" \
  -d '{"message": "BGP neighbor 10.1.1.1 is stuck in Active state"}'

Returns Server-Sent Events (SSE) with content, tool_call, file_created, and done events.

Chat (Sync)

curl -X POST https://api.damiraai.com/agent/chat/sync \
  -H "X-API-Key: damira_sk_yourkey" \
  -H "Content-Type: application/json" \
  -d '{"message": "Audit this config for security issues:\nhostname R1\nenable password cisco123"}'

Returns a single JSON response with response, session_id, and deliverables.

Multi-Turn (Session Continuity)

Pass the sessionId from the first response to maintain context:

curl -X POST https://api.damiraai.com/agent/chat/sync \
  -H "X-API-Key: damira_sk_yourkey" \
  -H "Content-Type: application/json" \
  -d '{"message": "Now generate a MOP for that fix", "sessionId": "abc-123-def"}'

Export Spreadsheet to Excel

curl -X POST https://api.damiraai.com/agent/export-xlsx \
  -H "X-API-Key: damira_sk_yourkey" \
  -H "Content-Type: application/json" \
  -d '{"filename": "CUCM_Upgrade_Plan.damira.json", "content": "..."}' \
  -o upgrade-plan.xlsx

Request Body Options

FieldTypeDescription
messagestring (required)Your question or request
sessionIdstringContinue a previous conversation
executionModestringadvisor (default), guided, or lab
projectIdstringResume a specific project workspace
context.domainstringvoice_uc, security, route_switch, wireless

Health Check

curl https://api.damiraai.com/health

OpenAPI Spec

Full machine-readable spec at:

https://api.damiraai.com/openapi.json

Import into Postman, Bruno, or any OpenAPI-compatible tool.

Tips

  • Use chat/sync for scripts and automation (simpler response format)
  • Use chat (SSE) for real-time UIs that show streaming progress
  • The executionMode field controls SSH access — leave as advisor unless you're in a lab
  • Rate limits are per API key, per day (check your tier)

On this page