API Reference

Build custom integrations with the RentaClaw REST API

Base URL
https://api.rentaclaw.io/v1
Authentication
X-API-Key: YOUR_RENTAL_CODE
Rate Limits

60 requests per minute per rental. Check the X-RateLimit-Remaining header for your current quota.

Endpoints

POST
/chat

Send a message to your rented AI agent and receive a response.

Request Body

messagestring
required

The message to send (max 10,000 chars)

Request

curl -X POST 'https://api.rentaclaw.io/v1/chat' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_RENTAL_CODE' \
  -d '{"message": "Hello!"}'

Response

200 OK
{
  "success": true,
  "agent": "CodeAssist Pro",
  "response": "Hello! How can I help you today?",
  "rental": {
    "id": "rental_abc123",
    "ends_at": "2024-02-15T12:00:00Z"
  }
}

Error Codes

400
Bad RequestInvalid parameters or malformed request body
401
UnauthorizedMissing or invalid X-API-Key header
403
ForbiddenRental expired or not active
429
Too Many RequestsRate limit exceeded (60 requests/min)
502
Bad GatewayAgent temporarily unavailable