Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.callprep.app/llms.txt

Use this file to discover all available pages before exploring further.

All errors return a JSON body with an error field containing a machine-readable code.
{
  "error": "credits_exhausted",
  "used": 50,
  "limit": 50
}

HTTP status codes

StatusMeaning
202Request accepted (POST /research)
200Success (GET /research-status)
400Bad request — invalid parameters
401Unauthorized — missing or invalid key
404Not found — research ID doesn’t exist
429Too many requests — credits exhausted
500Internal server error

Error codes

Authentication errors (401)

CodeDescription
missing_api_keyNo Authorization header provided
invalid_keyKey not found, revoked, or belongs to another account

Request errors (400)

CodeDescription
missing_emailemail field is required
invalid_email_formatEmail address is not valid
missing_key_idAPI key ID not found in request
api_key_has_no_productThe key has no product context — regenerate it

Credit errors (429)

CodeDescription
credits_exhaustedMonthly credits are fully used
trial_limit_reachedFree plan 3-credit limit reached
Response body includes:
{
  "error": "credits_exhausted",
  "used": 50,
  "limit": 50
}

Not found (404)

CodeDescription
not_foundThe research_id does not exist or belongs to a different account

Research job errors

These appear in the error field when status is failed:
CodeDescription
internal_errorAn unexpected error occurred in the pipeline
timeoutThe job exceeded maximum processing time (auto-retryable)

Handling errors

const res  = await fetch(`${BASE_URL}/research`, { ... });
const data = await res.json();

if (!res.ok) {
  switch (data.error) {
    case 'credits_exhausted':
      console.error(`Out of credits: ${data.used}/${data.limit}`);
      // Notify user to upgrade
      break;
    case 'invalid_key':
      console.error('Invalid API key — check your credentials');
      break;
    case 'invalid_email_format':
      console.error('Invalid email address provided');
      break;
    default:
      console.error('API error:', data.error);
  }
  return;
}

Retrying failed jobs

If a research job returns status: failed, you can resubmit the same request. A new credit will be consumed. If failures persist for the same email, please contact hello@callprep.app.
Jobs that fail due to a timeout (infrastructure issue) are eligible for a credit refund. Contact support with the research_id to request a refund.