Skip to main content

Base URL

https://api.useproxy.ai
The same base URL is used for both development and production. Your API key prefix determines the environment:
  • lk_dev_ keys operate in sandbox mode (test data, no real charges)
  • lk_live_ keys operate in production mode (real transactions)

Authentication

All endpoints require authentication via the Api-Key header:
curl https://api.useproxy.ai/v1/agents \
  -H "Api-Key: lk_dev_your_api_key"
See Authentication for more details.

Request Format

  • All request bodies must be JSON-encoded
  • Include Content-Type: application/json header for POST/PATCH requests

Response Format

All responses are JSON-encoded with the following structure: Success:
{
  "id": "agent_xyz789",
  "name": "checkout-bot",
  "status": "active"
}
Error:
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "Invalid API key"
  },
  "request_id": "req_abc123"
}
Paginated:
{
  "data": [...],
  "cursor": "abc123",
  "hasMore": true
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Access denied
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limited
500Server Error

Pagination

List endpoints support cursor-based pagination:
ParameterTypeDefaultDescription
limitnumber20Items per page (max 100)
cursorstring-Cursor from previous response
Example:
# First page
curl "https://api.useproxy.ai/v1/agents?limit=10" \
  -H "Api-Key: lk_dev_your_api_key"

# Next page
curl "https://api.useproxy.ai/v1/agents?limit=10&cursor=abc123" \
  -H "Api-Key: lk_dev_your_api_key"

Idempotency

For POST requests, you can include an Idempotency-Key header to safely retry requests:
curl -X POST https://api.useproxy.ai/v1/agents/register \
  -H "Api-Key: lk_dev_your_api_key" \
  -H "Idempotency-Key: unique-request-id-123" \
  -H "Content-Type: application/json" \
  -d '{"externalId": "my-agent", "userId": "user_abc", "name": "My Agent"}'

Resources