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

HeaderValue
Content-Typeapplication/json
X-API-KeyYour API key

Request Body

{ "prompt": "write me something about dogs", "guidance": "make it technical and detailed", "temperature": 0.7 }

Parameters

ParameterTypeRequiredDescription
promptstringYesThe prompt to format
guidancestringNoAdditional formatting guidance
temperaturefloatNo0.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

PlanMonthly LimitRate Limit
Personal100 web requests (No API)10/minute
Pro1,000 web + 500 API requests30/minute
Business5,000 web + 5,000 API requests100/minute
CustomUnlimitedCustom

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
429Too Many Requests - Rate limit exceeded
500Internal 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!