Submit an AI detection task
Pangram AI detection uses an async task API. Submit text to create a task.Example Response
Poll for the completed result
Poll the task endpoint until Example Success ResponseKey response fields:
stage is STAGE_SUCCESS or STAGE_FAILED.stage— terminal task stage for completed resultsfraction_ai/fraction_ai_assisted/fraction_human— breakdown of text by authorshipwindows— segment-level classifications with confidence scoresheadline— summary classification, such as"AI Detected"or"Human Written"
Request a dashboard link
Pass
public_dashboard_link: true when submitting the task to get a shareable link in the completed result.Error Handling
| Status Code | Description |
|---|---|
400 Bad Request | The request body is not properly formatted. |
401 Unauthorized | The x-api-key is missing or invalid. |
402 Payment Required | The account has insufficient credits. |
403 Forbidden | The API key does not own the requested task. |
404 Not Found | The requested task does not exist. |
422 Unprocessable Entity | The input text is invalid. |
429 Too Many Requests | The API key exceeds its configured rate limit. |
500 Internal Server Error | There was an error processing the request. |