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.Submit a Bulk API job
Use Example Response
POST /bulk for asynchronous AI detection across many inputs.Poll and fetch bulk results
Poll the bulk job until Then page through results.
status is succeeded, failed, or partial.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 or bulk job. |
404 Not Found | The requested task or bulk job does not exist. |
413 Payload Too Large | The bulk request exceeds the maximum billable units. |
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. |