Your AI Voice API - Complete Usage Guide
Learn how to programmatically manage LLM-ready content, answer pages, and AI optimization features
What Can You Do With the API?
Content Management
- Create and manage entities (answer pages) programmatically
- Generate AI-optimized content for products, services, or topics
- Update and modify existing answer pages
- Bulk operations for managing multiple entities at scale
Content Generation
- Auto-generate content blocks with AI assistance
- Create FAQs automatically based on entity information
- Generate JSON-LD schema for structured data
- Produce citations and evidence links
Analytics & Insights
- Track AI readiness scores for your content
- Monitor usage statistics across all entities
- Access dashboard metrics programmatically
- Export data for custom reporting
Integration Scenarios
- E-commerce: Auto-generate product answer pages
- CMS integration: Sync content from existing systems
- Marketing automation: Create content at scale
- Custom dashboards: Build your own analytics
Getting Started
Step 1: Check Your Plan
API access requires Professional plan or higher
| Plan | Rate Limit | API Access |
|---|---|---|
| Starter | - | Not Available |
| Professional | 100 req/hour | β Included |
| Business | 500 req/hour | β Included |
| Enterprise | 5,000 req/hour | β Included |
Step 2: Create an API Key
Generate your API key from the dashboard
- 1Log in to youraivoice.ai
- 2Navigate to API Keys page (
/api-keys) - 3Click "Create Key"
- 4Give your key a descriptive name (e.g., "Production Server", "Mobile App")
- 5Copy and save your key immediately - you won't see it again!
Step 3: Test Your API Key
Make your first API request
Try listing your entities with a simple cURL command:
curl -X GET "https://youraivoice.ai/api/entities" \ -H "Authorization: Bearer yav_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json"
API Reference
Base URL & Authentication
Base URL:
https://youraivoice.ai/apiAuthentication:
All requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYEntities Management
Create, read, update, and delete answer pages
/api/entitiesList all entities (answer pages)
/api/entitiesCreate a new entity
/api/entities/:idGet a specific entity
/api/entities/:idUpdate an entity
/api/entities/:idDelete an entity
Content Generation
Generate AI-optimized content
/api/entities/:id/generateGenerate AI content for an entity
/api/entities/:id/content-blocksGet content blocks for an entity
/api/entities/:id/faqsGet FAQs for an entity
/api/entities/:id/json-ldGet JSON-LD schema for an entity
Analytics & Scoring
Access metrics and AI readiness scores
/api/dashboard/statsGet dashboard statistics
/api/entities/:id/scoreGet AI readiness score for an entity
Code Examples
JavaScript / Node.js
const YOURAIVOICE_API_KEY = 'yav_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const BASE_URL = 'https://youraivoice.ai/api';
// Fetch all entities
async function getEntities() {
const response = await fetch(`${BASE_URL}/entities`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${YOURAIVOICE_API_KEY}`,
'Content-Type': 'application/json'
}
});
const data = await response.json();
return data.entities;
}
// Create new entity
async function createEntity(entityData) {
const response = await fetch(`${BASE_URL}/entities`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${YOURAIVOICE_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(entityData)
});
return await response.json();
}
// Usage
const entities = await getEntities();
console.log('Entities:', entities);Python
import requests
YOURAIVOICE_API_KEY = 'yav_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
BASE_URL = 'https://youraivoice.ai/api'
class YourAIVoiceAPI:
def __init__(self, api_key):
self.api_key = api_key
self.headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
def get_entities(self):
"""Get all entities"""
response = requests.get(
f'{BASE_URL}/entities',
headers=self.headers
)
response.raise_for_status()
return response.json()['entities']
def create_entity(self, entity_data):
"""Create new entity"""
response = requests.post(
f'{BASE_URL}/entities',
headers=self.headers,
json=entity_data
)
response.raise_for_status()
return response.json()
# Usage
api = YourAIVoiceAPI(YOURAIVOICE_API_KEY)
entities = api.get_entities()
print(f"Found {len(entities)} entities")cURL
# List all entities
curl -X GET "https://youraivoice.ai/api/entities" \
-H "Authorization: Bearer YOUR_API_KEY"
# Create new entity
curl -X POST "https://youraivoice.ai/api/entities" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Smart Fitness Watch",
"type": "product",
"description": "Advanced fitness tracking device"
}'
# Get JSON-LD schema
curl -X GET "https://youraivoice.ai/api/entities/ent_123/json-ld" \
-H "Authorization: Bearer YOUR_API_KEY"Security Best Practices
Store Keys Securely
Use environment variables or secret management services. Never hardcode keys in your application code.
Server-Side Only
Never expose API keys in client-side code, mobile apps, or browser JavaScript. Always use a backend proxy.
Rotate Keys Regularly
Generate new API keys periodically and revoke old ones from your dashboard.
Monitor Usage
Regularly check your API usage logs for unusual activity and set up alerts for suspicious patterns.
Rate Limits
Rate limits are enforced per API key based on your subscription plan:
| Plan | Requests/Hour | Best For |
|---|---|---|
| Professional | 100 | Small integrations, testing |
| Business | 500 | Medium-scale automation |
| Enterprise | 5,000 | Large-scale operations |
Rate Limit Headers:
Every response includes rate limit information:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1698765432Common Use Cases
π E-commerce Integration
Automatically generate answer pages for new products as they're added to your catalog. Sync product data, generate optimized content, and create structured data for better AI discovery.
π CMS Sync
Keep your CMS content synchronized with Your AI Voice. Automatically create entities from blog posts, update content when articles change, and generate AI-optimized FAQs.
π Custom Analytics
Build your own reporting interface using the API. Track entity performance, monitor AI readiness scores, generate custom reports, and integrate with your BI tools.
π Bulk Operations
Generate optimized content for multiple entities at scale. Perfect for agencies managing multiple clients or businesses with large product catalogs.