✨ New: explore our growing library of AI agentsExplore Now

API Reference

Complete reference for PeerX REST API endpoints

API Reference Preview

POST/api/v1/projects

Create a new project with an AI agent

Example Request
curl -X POST https://api.peerx.ai/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Wedding Planning",
    "agentId": "wedding-planner",
    "metadata": {
      "date": "2024-06-15",
      "budget": 50000
    }
  }'
Example Response
{
  "id": "proj_123",
  "name": "Wedding Planning",
  "status": "active",
  "createdAt": "2024-01-15T10:00:00Z"
}
GET/api/v1/projects/{id}

Retrieve project details by ID

Example Request
curl https://api.peerx.ai/v1/projects/proj_123 \
  -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "id": "proj_123",
  "name": "Wedding Planning",
  "agentId": "wedding-planner",
  "status": "active",
  "metadata": {...},
  "createdAt": "2024-01-15T10:00:00Z"
}
POST/api/v1/projects/{id}/chat

Send a message to the project agent

Example Request
curl -X POST https://api.peerx.ai/v1/projects/proj_123/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "I need help finding a venue"
  }'
Example Response
{
  "message": "I can help you find the perfect venue...",
  "suggestions": [...]
}