API Documentation
Everything you need to integrate InstantAPI into your application. A single endpoint powers six AI capabilities at $0.50 per call.
1Authentication
All API requests require authentication via the x-api-key header. Include your API key with every request.
x-api-key: your_api_key_hereYou can get your API key from the dashboard. Keep your API key secret -- do not expose it in client-side code or public repositories.
2Base URL
All API requests should be made to the following base URL:
3Endpoint
This is the single, unified endpoint for all AI tasks. Specify the task you want to perform in the request body. Every call costs $0.50 regardless of the task.
4Request Format
Send a JSON body with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
task | string | Required | One of: summarize, extract, analyze, translate, sentiment, code |
input | string | Required | The text or data to process |
options | object | Optional | Task-specific options (see each task below) |
{
"task": "summarize",
"input": "Your text content here...",
"options": {
"length": "short"
}
}5Tasks
InstantAPI supports six AI-powered tasks. Each task is accessed through the same /generate endpoint.
Summarize
Condense long text into clear, concise summaries.
Options
length(string)-- "short" | "medium" | "long" - Controls summary length. Defaults to "medium".Request
{
"task": "summarize",
"input": "Artificial intelligence has transformed the way businesses operate. From automating routine tasks to providing deep insights from complex data sets, AI technologies are being adopted across every industry. Machine learning algorithms can now process vast amounts of information in seconds, enabling real-time decision making that was previously impossible...",
"options": {
"length": "short"
}
}Response
{
"success": true,
"data": {
"summary": "AI is revolutionizing business operations through task automation and data-driven insights, with machine learning enabling real-time decision making across industries."
},
"task": "summarize",
"timestamp": "2026-03-25T12:00:00.000Z"
}Extract
Extract structured data from unstructured text.
Options
fields(string[])-- Array of field names to extract. e.g. ["name", "email", "phone"]Request
{
"task": "extract",
"input": "Contact John Smith at john@example.com or call him at (555) 123-4567. He works as a Senior Engineer at Acme Corp since 2019.",
"options": {
"fields": ["name", "email", "phone", "title", "company"]
}
}Response
{
"success": true,
"data": {
"name": "John Smith",
"email": "john@example.com",
"phone": "(555) 123-4567",
"title": "Senior Engineer",
"company": "Acme Corp"
},
"task": "extract",
"timestamp": "2026-03-25T12:00:00.000Z"
}Analyze
Analyze data or text for patterns, trends, and insights.
Request
{
"task": "analyze",
"input": "Q1 Revenue: $2.1M (up 15%), Q2 Revenue: $2.4M (up 14%), Q3 Revenue: $2.9M (up 21%), Q4 Revenue: $3.1M (up 7%). Customer churn decreased from 5.2% to 3.8%. New customer acquisition cost dropped by 12%."
}Response
{
"success": true,
"data": {
"insights": [
"Annual revenue of $10.5M with consistent quarter-over-quarter growth",
"Q3 showed strongest growth at 21%, while Q4 growth slowed to 7%",
"Customer retention improved significantly with churn dropping 1.4 percentage points",
"Lower acquisition costs combined with reduced churn suggest improving unit economics"
],
"trends": ["accelerating_revenue", "improving_retention", "decreasing_cac"],
"sentiment": "positive"
},
"task": "analyze",
"timestamp": "2026-03-25T12:00:00.000Z"
}Translate
Translate text between 100+ languages with context-aware accuracy.
Options
targetLanguage(string)-- Target language for translation. e.g. "spanish", "french", "japanese"Request
{
"task": "translate",
"input": "The quick brown fox jumps over the lazy dog. This is a common pangram used in typography.",
"options": {
"targetLanguage": "spanish"
}
}Response
{
"success": true,
"data": {
"translation": "El rápido zorro marrón salta sobre el perro perezoso. Este es un pangrama común utilizado en tipografía.",
"sourceLanguage": "english",
"targetLanguage": "spanish"
},
"task": "translate",
"timestamp": "2026-03-25T12:00:00.000Z"
}Sentiment
Analyze the tone, emotion, and intent behind any text.
Request
{
"task": "sentiment",
"input": "I absolutely love this product! The customer service team was incredibly helpful and resolved my issue within minutes. Will definitely recommend to friends."
}Response
{
"success": true,
"data": {
"sentiment": "positive",
"confidence": 0.96,
"emotions": {
"joy": 0.85,
"trust": 0.78,
"surprise": 0.12,
"anger": 0.01
},
"aspects": [
{ "topic": "product", "sentiment": "positive" },
{ "topic": "customer service", "sentiment": "positive" },
{ "topic": "responsiveness", "sentiment": "positive" }
]
},
"task": "sentiment",
"timestamp": "2026-03-25T12:00:00.000Z"
}Code
Generate, explain, or refactor code in 50+ programming languages.
Options
language(string)-- Programming language. e.g. "python", "javascript", "rust", "go"Request
{
"task": "code",
"input": "Write a function that checks if a string is a valid palindrome, ignoring spaces and punctuation",
"options": {
"language": "python"
}
}Response
{
"success": true,
"data": {
"code": "import re\n\ndef is_palindrome(s: str) -> bool:\n cleaned = re.sub(r'[^a-zA-Z0-9]', '', s).lower()\n return cleaned == cleaned[::-1]",
"language": "python",
"explanation": "This function strips all non-alphanumeric characters using regex, converts to lowercase, then checks if the string reads the same forwards and backwards."
},
"task": "code",
"timestamp": "2026-03-25T12:00:00.000Z"
}6Response Format
All successful responses follow the same JSON structure:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
data | object | The result data, varies by task |
task | string | The task that was executed |
timestamp | string | ISO 8601 timestamp of the response |
{
"success": true,
"data": {
// Task-specific result data
},
"task": "summarize",
"timestamp": "2026-03-25T12:00:00.000Z"
}Error responses include an error field instead of data:
{
"success": false,
"error": {
"code": 401,
"message": "Invalid API key"
},
"timestamp": "2026-03-25T12:00:00.000Z"
}7Error Codes
Unauthorized
Invalid or missing API key. Check your x-api-key header.
Payment Required
No credits remaining. Add credits in your dashboard.
Too Many Requests
Rate limit exceeded. Wait and retry with exponential backoff.
Internal Server Error
Something went wrong on our end. You are not charged for 5xx errors.
8Code Examples
curl -X POST https://instantapis.net/api/v1/generate \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"task": "summarize",
"input": "Your long text goes here...",
"options": {
"length": "short"
}
}'9Rate Limits
To ensure fair usage and platform stability, API calls are rate-limited per API key.
60
Requests / minute
1,000
Requests / hour
10,000
Requests / day
When rate limited, you will receive a 429 status code. Implement exponential backoff in your retry logic. Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.
Need higher limits? Contact our sales team for enterprise rate limits.
10Pricing
All six tasks, same price. No subscriptions or monthly fees. You only pay for successful API calls. Failed calls (5xx errors) are never charged.
- All 6 tasks included
- No minimum commitment
- Volume discounts available
- Credits never expire
Ready to start building?
Sign up for free, get 10 API calls on us, and start integrating in minutes.
Get Your API Key