Get your API key from the dashboard and include it in your requests:
# Include your API key in headers
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.emerlya.com/v1/generate
Send a POST request to generate content:
# Generate blog content
POST /v1/generate
{
"prompt": "Write a blog about AI",
"type": "blog_post",
"brand_id": "your_brand_id"
}
/v1/generate
Generate various types of content using AI with your brand voice and guidelines.
prompt
- Content descriptiontype
- Content type (blog, email, social)brand_id
- Brand profile IDlength
- Content length preference/v1/analyze
Upload and analyze documents to extract insights and improve content generation.
file
- Document file (PDF, DOCX)brand_id
- Brand profile IDextract_guidelines
- Extract brand guidelinesextract_knowledge
- Extract knowledge base/v1/brands
Manage brand profiles, voice settings, and content guidelines programmatically.
GET /brands
- List all brandsPOST /brands
- Create new brandPUT /brands/:id
- Update brandDELETE /brands/:id
- Delete brand/v1/analytics
Get insights on your content performance, API usage, and generation statistics.
// Install: npm install emerlya-ai
const Emerlya = require('emerlya-ai');
const client = new Emerlya({
apiKey: 'your-api-key'
});
async function generateContent() {
const response = await client.generate({
prompt: 'Write marketing copy for AI tool',
type: 'marketing_copy',
brandId: 'brand_123'
});
console.log(response.content);
}
# Install: pip install emerlya-ai
import emerlya
# Initialize client
client = emerlya.Client(
api_key="your-api-key"
)
# Generate content
response = client.generate(
prompt="Create email newsletter content",
content_type="email",
brand_id="brand_123",
length="medium"
)
print(response.content)