API Reference
Integrate PromptFixLab directly into your applications and workflows.
Authentication
All API requests require an API key sent via the Authorization header.
Authorization: Bearer YOUR_API_KEYEndpoints
POST
/api/v1/analyzeAnalyze a prompt and return diagnostic information including issues, score, and suggestions.
Request Body
{
"prompt": "Your prompt text here",
"model": "gpt-4" // optional
}Response
{
"score": 65,
"issues": [
{
"type": "vague_instruction",
"severity": "warning",
"message": "Instructions could be more specific"
}
],
"suggestions": [
"Add explicit output format requirements",
"Include examples for clarity"
]
}POST
/api/v1/fixAutomatically fix and optimize a prompt based on best practices.
Request Body
{
"prompt": "Your prompt text here",
"style": "professional" // optional: casual, professional, technical
}Response
{
"original_prompt": "...",
"fixed_prompt": "...",
"changes": [
"Added clear role definition",
"Structured output format",
"Included examples"
],
"new_score": 92
}Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 100 | 10/min |
| Pro | 1,000 | 60/min |
| Team | 10,000 | 300/min |