API Documentation
Integrate SynthGen's synthetic data generation capabilities into your applications with our comprehensive RESTful API.
RESTful API
JSON Responses
Rate Limited
Authentication Required
Quick Start
Request API access and get started with the SynthGen API
1
Request Access
Submit your API access request with your use case
2
Get Approved
We'll review your request and provide API credentials
3
Start Building
Integrate our API and generate synthetic data
API Endpoints
POST
/api/feedback/generateGenerate realistic customer feedback and reviews
2 credits per request
Request Body
{
"productType": "mobile_app",
"sentimentMix": "balanced",
"feedbackCount": 5,
"complexityLevel": "medium"
}Response
{
"success": true,
"data": [
{
"id": "feedback_123",
"rating": 4,
"title": "Great app with minor issues",
"content": "I've been using this app for a few weeks now...",
"sentiment": "positive",
"timestamp": "2024-01-15T10:30:00Z"
}
],
"creditsUsed": 2,
"remainingCredits": 48
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| productType | string | Yes | Type of product (mobile_app, web_app, ecommerce, etc.) |
| sentimentMix | string | Yes | Distribution of sentiment (balanced, positive, negative, mixed) |
| feedbackCount | number | Yes | Number of feedback entries to generate (1-50) |
| complexityLevel | string | No | Complexity of generated content (simple, medium, complex) |
Ready to Integrate?
Request API access and start generating synthetic data in your applications today.
Authentication
API Key Authentication
All API requests require authentication using your API key
Header Authentication
Authorization: Bearer your_api_key_here
Example Request
curl -X POST https://synthgen.app/api/feedback/generate \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"productType": "mobile_app",
"sentimentMix": "balanced",
"feedbackCount": 5
}'Security Note
Keep your API key secure and never expose it in client-side code. Use environment variables or secure key management systems.
Rate Limits & Pricing
Rate Limits
API usage is limited based on your subscription tier
Free Tier
5 requests/day
Basic Plan
100 requests/day
Pro Plan
1,000 requests/day
Enterprise
Unlimited
Credit Usage
Different operations consume different amounts of credits
Feedback Generation
2 credits per request
Interview Generation
2 credits per question
Support Tickets
1 credit per ticket
Error Handling
Common Error Responses
Understanding API error responses and status codes
401 Unauthorized
{
"success": false,
"error": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}429 Too Many Requests
{
"success": false,
"error": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"retryAfter": 3600
}400 Bad Request
{
"success": false,
"error": "Invalid request parameters",
"code": "INVALID_PARAMETERS",
"details": {
"productType": "Must be one of: mobile_app, web_app, ecommerce"
}
}SDKs & Code Examples
JavaScript/Node.js
Example implementation using fetch API
const response = await fetch('https://synthgen.app/api/feedback/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
productType: 'mobile_app',
sentimentMix: 'balanced',
feedbackCount: 5
})
});
const data = await response.json();
console.log(data);Python
Example implementation using requests library
import requests
response = requests.post(
'https://synthgen.app/api/feedback/generate',
headers={
'Authorization': 'Bearer your_api_key_here',
'Content-Type': 'application/json'
},
json={
'productType': 'mobile_app',
'sentimentMix': 'balanced',
'feedbackCount': 5
}
)
data = response.json()
print(data)