API
Developer API
Integrate Osmosian's powerful AI phone agents directly into your applications with our comprehensive API.
Getting Started
Our RESTful API allows you to programmatically create and manage AI phone agents, initiate calls, retrieve transcripts, and more. Follow these steps to get started:
1. Sign Up for an API Key
Create an account and generate your API key from the developer dashboard.
2. Install the SDK
We provide SDKs for popular programming languages to make integration easy.
npm install @osmosian/sdk
pip install osmosian-sdk
3. Make Your First API Call
Initialize the client with your API key and make your first request.
const osmosian = require('@osmosian/sdk');
const client = new osmosian.Client('YOUR_API_KEY');
async function createAgent() {
const agent = await client.agents.create({
name: 'Customer Support Agent',
voice: 'emma',
language: 'en-US'
});
console.log(agent);
}
createAgent();
API Reference
Create an Agent
POST /v1/agents
Create a new AI phone agent with customized voice, language, and behavior settings.
// Request
{
"name": "Sales Agent",
"voice": "james",
"language": "en-US",
"personality": "friendly",
"knowledge_base_ids": ["kb_12345"]
}
List Agents
GET /v1/agents
Retrieve a list of all your AI phone agents.
// Response
{
"agents": [
{
"id": "agent_12345",
"name": "Sales Agent",
"voice": "james",
"language": "en-US",
"created_at": "2023-06-15T10:30:00Z"
},
...
]
}