API Documentation
Welcome to the AxionPrompt API documentation. Use our API to integrate prompt formatting into your applications.
Authentication
All API requests require authentication using an API key. Include your API key in the request header:
X-API-Key: pf_your_api_key_here
Get your API key from the dashboard after registration.
Base URL
https://app.axionprompt.com
Endpoints
POST /api/format
Format a prompt with AI-powered enhancement.
Request Headers
| Header | Value |
| Content-Type | application/json |
| X-API-Key | Your API key |
Request Body
{
"prompt": "write me something about dogs",
"guidance": "make it technical and detailed",
"temperature": 0.7
}
Parameters
| Parameter | Type | Required | Description |
| prompt | string | Yes | The prompt to format |
| guidance | string | No | Additional formatting guidance |
| temperature | float | No | 0.0-1.0 (default: 0.7) |
Response
{
"success": true,
"original": "write me something about dogs",
"formatted": "Create a comprehensive technical guide...",
"usage": {
"current": 5,
"limit": 100,
"remaining": 95
}
}
GET /api/health
Check API health status.
Response
{
"status": "healthy",
"version": "1.0.0"
}
Rate Limits
| Plan | Monthly Limit | Rate Limit |
| Personal | 100 web requests (No API) | 10/minute |
| Pro | 1,000 web + 500 API requests | 30/minute |
| Business | 5,000 web + 5,000 API requests | 100/minute |
| Custom | Unlimited | Custom |
Error Codes
| Code | Description |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Code Examples
Python
import requests
url = "http://localhost:5000/api/format"
headers = {
"Content-Type": "application/json",
"X-API-Key": "pf_your_api_key"
}
data = {
"prompt": "write a function to sort an array",
"guidance": "make it clear and concise"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
JavaScript
const response = await fetch('https://app.axionprompt.com/api/format', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'pf_your_api_key'
},
body: JSON.stringify({
prompt: 'write a function to sort an array',
guidance: 'make it clear and concise'
})
});
const data = await response.json();
console.log(data);
cURL
curl -X POST https://app.axionprompt.com/api/format \
-H "Content-Type: application/json" \
-H "X-API-Key: pf_your_api_key" \
-d '{"prompt":"write a function to sort an array"}'
💡 Tip: Use the Chrome extension for seamless browser integration, or integrate the API into your own applications!