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_KEY

Endpoints

POST/api/v1/analyze

Analyze 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/fix

Automatically 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

PlanRequests/MonthRate Limit
Free10010/min
Pro1,00060/min
Team10,000300/min