API reference
This section provides detailed API reference documentation for Raya Voice AI Agents API.
All endpoints use HTTPS. HTTP is not supported. API keys that call the API over HTTP may be subject to automatic rotation.
API Overview
Raya Voice AI Agents API
The Raya Voice AI Agents API enables you to create, manage, and interact with AI voice agents that can make phone calls, conduct conversations, and handle batch operations.
Base URL: https://v1.getraya.app/api
Authentication: API key via X-API-Key header
Agent guides (create/update):
Available Endpoints:
- Calls: Initiate calls, get call details, list agent calls
- Agents: Create (
POST /api/agent), list, get, update, delete, and manage agents. Create and response bodies useoutput_fields(array of key–description pairs: each item haskeyanddescription) andoutput_instructions(string).PATCH /api/agent/{id}accepts the same fields as create. - Job Agents: Create (
POST /api/job-agent), list, get, update. Use template fields (agent_role, introduction, questions, etc.;agent_roleis how the voice agent behaves, distinct from job/position).output_fields(array of key–description pairs),output_instructions(string). Optionalgenerate_from_jd_text: paste JD text to generate template content.PATCH /api/job-agent/{id}accepts the same fields as create exceptgenerate_from_jd_text. Types:hr_pre_screening,hr_mock_interview,hr_interview. - Batches: Create and manage batch calling campaigns
- User Interaction: Nudge users during active sessions
Authentication
All APIs require authentication using an API key. Include the API key in the request headers:
Raya Voice AI Agents API
Obtaining API Keys
To obtain your API key, please contact your administrator.
Request and Response Formats
Content Types
- Request:
application/jsonfor most endpoints - Response:
application/jsonfor data endpoints
Error Responses
The API returns errors in a consistent format:
Common HTTP status codes:
200- Success400- Bad Request (validation error)401- Unauthorized (invalid or missing API key)402- Calls not allowed right now. Returned when placing a call, creating a batch, adding contacts to a batch or starting one.codeisINSUFFICIENT_CREDITSwhen the balance is at or below its limit (credits are over), orTEAM_SUSPENDEDwhile calls are restricted on the account. Either way, reach out to support@litwizlabs.ai404- Not Found429- Rate Limit Exceeded500- Internal Server Error
Rate Limiting
Raya Voice AI Agents API
- Call initiation: Per-key limit (default 1 per 20 seconds); configurable in key settings
- Other endpoints: 1 request per second per API key
When rate limited, you’ll receive a 429 status code with details about when to retry.
Best Practices
- Store API keys securely - Never commit API keys to version control
- Handle errors gracefully - Always check response status codes
- Respect rate limits - Implement exponential backoff for retries
- Validate input - Check required fields and formats before making requests
- Monitor call status - For Agents API, poll call status endpoints to track call progress
Code Examples
Raya Voice AI - Initiate a Call
Raya Voice AI - Get Call Details
SDKs and Libraries
While we don’t provide official SDKs yet, our REST APIs are straightforward to use with any HTTP client library. Popular options include:
- Python:
requestslibrary - JavaScript/Node.js:
axiosorfetch - cURL: Command-line tool
- Postman: For testing and exploration
Support and Resources
- Documentation: This site
- Support Email: support@litwizlabs.ai
- Dashboard: https://console.getraya.app
Next Steps
- Explore the Agents API endpoints for voice agent management
- Review the request/response schemas for each endpoint
- Try the examples in your preferred programming language

