Skip to content

REST API Quick Start ​

Get started with the Converra REST API in 5 minutes.

Prefer AI Assistants?

If you use Cursor, Claude Code, or another AI coding assistant, the MCP integration is faster and easier.

1. Get Your API Key ​

  1. Sign up at converra.ai
  2. Navigate to Integrations → API Keys
  3. Create a new API key

2. Create Your First Agent ​

bash
curl -X POST https://converra.ai/api/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Agent",
    "content": "You are a helpful customer support agent...",
    "llmModel": "gpt-4o",
    "objective": "Resolve customer issues efficiently and politely"
  }'

3. Log a Run ​

bash
curl -X POST https://converra.ai/api/v1/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "YOUR_AGENT_ID",
    "content": "User: I need help with my order\nAssistant: I would be happy to help..."
  }'

4. Run an Optimization ​

bash
curl -X POST https://converra.ai/api/v1/optimizations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "YOUR_AGENT_ID",
    "variantCount": 3
  }'

5. Check Results ​

bash
curl https://converra.ai/api/v1/optimizations/YOUR_OPTIMIZATION_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Next Steps ​