A specialized API that solves the growing content evaluation bottleneck in the age of AI-generated content. Endata enables developers to programmatically rank and evaluate content variations against specific business goals before deployment, eliminating subjective decision-making and manual review processes.
This API accepts multiple content variations (text, images, etc.) and provides objective, data-driven rankings based on user-defined optimization goals like engagement, conversion, clarity, or SEO performance. Each analysis includes detailed scores, identified strengths, and specific improvement suggestions for each content variation.
Designed for seamless integration into automated workflows, Endata serves as the critical intelligence layer between content generation and deployment, helping MarTech platforms, enterprises, and agencies scale their content operations while maintaining quality and effectiveness. The API's unified endpoint structure, comprehensive documentation, and flexible authentication make implementation straightforward for development teams of all sizes.
Transform your content selection from subjective guesswork to data-driven decisions with Endata's Content Optimization API.
All API requests require authentication using an API key passed via the Authorization
header.
Bearer YOUR_API_KEY
You can generate API keys from your account dashboard. Each key can be named for different purposes (development, testing, production) and have different expiration settings.
curl -X POST \
https://endata.com/api/v1/evaluate \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"content_type": "text",
"content_variations": [
{
"id": "text_1",
"content": "Revolutionize Your Marketing with AI-Powered Analytics"
},
{
"id": "text_2",
"content": "AI Analytics: The Secret to 10x Marketing ROI"
}
],
"optimization_goal": "engagement"
}'
The /evaluate
endpoint supports direct file uploads for media content (images, videos, and audio) using multipart form-data requests. This removes the need to first host your media files elsewhere.
multipart/form-data
request with: data
containing your JSON parameters file_{content_type}_{variation_id}
File fields must be named according to the following pattern:
file_{content_type}_{variation_id}
Examples:
file_image_img1
- For an image with variation ID "img1" file_video_vid_example
- For a video with variation ID "vid_example" file_audio_podcast_intro
- For audio with variation ID "podcast_intro" Content Type | Supported Formats | Max Size |
---|---|---|
image | JPEG, PNG, GIF, WebP | 10MB |
video | MP4, WebM, QuickTime | 10MB |
audio | MP3, WAV, OGG, WebM | 10MB |
curl -X POST \
https://endata.com/api/v1/evaluate \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'data={
"content_type": "image",
"content_variations": [
{ "id": "img_1" },
{ "id": "img_2" }
],
"optimization_goal": "engagement",
"audience": "millennials"
}' \
-F 'file_image_img_1=@/path/to/image1.jpg' \
-F 'file_image_img_2=@/path/to/image2.jpg'
// Using FormData for file uploads
const formData = new FormData();
// Add JSON parameters
formData.append('data', JSON.stringify({
content_type: "image",
content_variations: [
{ id: "img_1" },
{ id: "img_2" }
],
optimization_goal: "engagement",
audience: "millennials"
}));
// Add image files
formData.append('file_image_img_1', document.getElementById('fileInput1').files[0]);
formData.append('file_image_img_2', document.getElementById('fileInput2').files[0]);
// Send the request
const response = await fetch('https://endata.com/api/v1/evaluate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
// Note: Don't set Content-Type header, it will be set automatically with the correct boundary
},
body: formData
});
const data = await response.json();
console.log(data);
import requests
url = "https://endata.com/api/v1/evaluate"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
# Parameters as JSON
data = {
"content_type": "image",
"content_variations": [
{"id": "img_1"},
{"id": "img_2"}
],
"optimization_goal": "engagement",
"audience": "millennials"
}
# Create the multipart request
files = {
'data': (None, json.dumps(data), 'application/json'),
'file_image_img_1': ('image1.jpg', open('/path/to/image1.jpg', 'rb'), 'image/jpeg'),
'file_image_img_2': ('image2.jpg', open('/path/to/image2.jpg', 'rb'), 'image/jpeg')
}
response = requests.post(url, files=files, headers=headers)
result = response.json()
print(result)
// Using FormData for mixed content (URLs and file uploads)
const formData = new FormData();
// JSON data with mixed content sources
formData.append('data', JSON.stringify({
content_type: "image",
content_variations: [
{
id: "img_1",
content: "https://example.com/hosted-image.jpg" // Already hosted image URL
},
{
id: "img_2" // Will be uploaded directly
}
],
optimization_goal: "conversion"
}));
// Add only the image that needs to be uploaded
formData.append('file_image_img_2', document.getElementById('fileInput').files[0]);
const response = await fetch('https://endata.com/api/v1/evaluate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
},
body: formData
});
const data = await response.json();
console.log(data);
Retrieve a list of all supported content types that can be used for content evaluation requests.
curl -X GET \
https://endata.com/api/v1/content-types \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"content_types": [
"text",
"image",
"audio",
"video"
]
}
Retrieve a list of all supported optimization goals that can be used for content evaluation requests.
curl -X GET \
https://endata.com/api/v1/optimization-goals \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"optimization_goals": [
"visibility",
"engagement",
"conversion",
"retention",
"monetization"
]
}
Retrieve a list of all supported sentiment options that can be specified in content evaluation requests.
curl -X GET \
https://endata.com/api/v1/sentiments \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"sentiments": [
"trustworthy",
"authoritative",
"urgent",
"empathetic",
"innovative",
"positive",
"curious",
"transparent"
]
}
Retrieve a list of all supported audience categories that can be specified in content evaluation requests.
curl -X GET \
https://endata.com/api/v1/audiences \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"audiences": [
"technical_decision_makers",
"marketing_professionals",
"gen_z",
"millennials",
"parents",
"young_professionals",
"enterprise_buyers",
"creatives",
"general_public",
"... and many more"
]
}
Retrieve a list of all supported marketing funnel stages that can be specified in content evaluation requests.
curl -X GET \
https://endata.com/api/v1/funnel-stages \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"funnel_stages": [
"awareness",
"consideration",
"decision",
"conversion",
"implementation",
"expansion",
"retention",
"advocacy"
]
}
Retrieve a list of all supported brand style options that can be specified in content evaluation requests.
curl -X GET \
https://endata.com/api/v1/brand-styles \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"brand_styles": [
"professional",
"technical",
"accessible",
"innovative",
"data_driven",
"concise",
"trustworthy",
"conversational"
]
}
Compare multiple content variations against a specific optimization goal. This endpoint accepts 1-10 content variations of the same type and returns a ranked list with detailed analysis of each variation's strengths and improvement areas. The response includes your remaining credit balance.
This endpoint supports both JSON requests and multipart form-data requests for direct file uploads of images, videos, and audio files.
curl -X POST \
https://endata.com/api/v1/evaluate \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"content_type": "text",
"content_variations": [
{
"id": "text_1",
"content": "Revolutionize Your Marketing with AI-Powered Analytics"
},
{
"id": "text_2",
"content": "AI Analytics: The Secret to 10x Marketing ROI"
}
],
"optimization_goal": "engagement"
}'
Parameter | Type | Required | Description |
---|---|---|---|
content_type | string (enum) | Yes | Type of content being evaluated Available options: Example: text |
content_variations | array | Yes | Array of content variations to evaluate (1-10 items) |
optimization_goal | string (enum) | Yes | The goal to optimize for Available options: Example: engagement |
sentiment | string (enum) | No | The desired emotional tone for the content (optional) Available options: Example: innovative |
audience | string (enum) | No | The target audience for the content (optional) Available options: Example: marketing_professionals |
funnel_stage | string (enum) | No | The marketing funnel stage where the content will be used (optional) Available options: Example: awareness |
brand_style | string (enum) | No | The brand style to align with (optional) Available options: Example: innovative |
metadata | object | No | Additional metadata for tracking purposes Example: { "campaign_id": "summer_promo_2025", "source": "marketing_team" } |
{
"request_id": "req_1a2b3c4d5e6f",
"rankings": [
{
"rank": 1,
"content_id": "text_2",
"score": 0.87,
"goal_relevance": "High engagement potential with clear call-to-action",
"strengths": [
"Strong value proposition",
"Includes specific benefit (10x ROI)",
"Creates curiosity"
],
"improvement_areas": [
"Could be more specific to target audience"
],
"issues": [
"Benefit claim needs substantiation"
],
"recommendations": [
"Add social proof or case study reference",
"Emphasize unique selling proposition"
],
"tags": [
"clear",
"concise",
"informative"
]
},
{
"rank": 2,
"content_id": "text_3",
"score": 0.74,
"goal_relevance": "Moderately engaging but lacks clear direction",
"strengths": [
"Evokes transformation",
"Clear AI focus"
],
"improvement_areas": [
"Less specific about benefits",
"Missing call-to-action element"
],
"issues": [
"Generic language",
"No clear value proposition"
],
"recommendations": [
"Quantify benefits",
"Add strong call-to-action"
],
"tags": [
"transformative",
"technology-focused"
]
},
{
"rank": 3,
"content_id": "text_1",
"score": 0.68,
"goal_relevance": "Low engagement potential due to generic messaging",
"strengths": [
"Direct and clear",
"Mentions both AI and analytics"
],
"improvement_areas": [
"Generic language ('revolutionize')",
"Less emotionally compelling"
],
"issues": [
"Overused buzzwords",
"No specific differentiation"
],
"recommendations": [
"Replace generic terms with specific benefits",
"Include emotional trigger words"
],
"tags": [
"generic",
"direct",
"basic"
]
}
],
"confidence_score": 0.92,
"optimization_goal": "engagement",
"echo": {
"content_type": "text",
"optimization_goal": "engagement",
"audience": "marketing_professionals"
},
"credits": {
"used": 6,
"remaining": 994
}
}
{
"error": {
"code": "invalid_request",
"message": "Request validation failed. See details for more information.",
"request_id": "req_1a2b3c4d5e6f",
"details": {
"content_variations": "Array must contain between 2 and 10 items"
}
}
}
{
"error": {
"code": "unauthorized",
"message": "Invalid API key or missing authentication",
"request_id": "req_2b3c4d5e6f7"
}
}
{
"error": {
"code": "payment_required",
"message": "Insufficient credits. Required: 24, Available: 10",
"request_id": "req_3c4d5e6f7g8"
}
}
{
"error": {
"code": "unsupported_media_type",
"message": "File image1.xyz has unsupported type for image content",
"request_id": "req_4d5e6f7g8h9"
}
}
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 35 seconds.",
"request_id": "req_4d5e6f7g8h9"
}
}
{
"error": {
"code": "server_error",
"message": "An unexpected error occurred. Please try again later.",
"request_id": "req_6f7g8h9i0j1"
}
}