API Reference

Documentation

Everything you need to integrate Pawan.Krd into your application.

Error Codes

All errors return a JSON body with an error object containing a message, type, and code.

📋Error Response
1{ 2 "error": { 3 "message": "Invalid API key provided.", 4 "type": "authentication_error", 5 "code": "invalid_api_key" 6 } 7}

HTTP Status Codes

400

Bad Request

Invalid request body or missing required fields. Check the error message for details.

401

Unauthorized

Invalid or missing API key. Ensure your key starts with pk- and is correctly included.

402

Payment Required

Subscription inactive or insufficient credits. Upgrade your plan or purchase credits.

403

Forbidden

Your plan does not have access to this model or feature.

404

Not Found

The requested model or endpoint does not exist.

429

Too Many Requests

Rate limit or credit quota exceeded. Implement backoff and retry.

500

Internal Server Error

Something went wrong on our end. Try again later.

503

Service Unavailable

The model is temporarily unavailable. Try again shortly.

Handling Errors

Always check the HTTP status code and parse the error response body. Implement exponential backoff for 429 and 5xx errors.