A key that works on my laptop can still fail in a worker. Before I write the client, I test the key in Postman, check who gets status-page alerts, and decide when polling should stop. The examples use the AI Checker Humanizer API for text detection and rewriting.
Send real requests before writing code
If the API publishes an OpenAPI file, import it into Postman and send a few requests by hand. You'll see the real response shapes, including the error bodies, before any of them end up in your code.
In the public Postman workspace for the AI Checker Humanizer API, the collection is imported from the OpenAPI file. Its description shows how to set the key and read the responses:
- Where the key lives. The collection uses
{{AICH_API_KEY}}as its Bearer token. Set the key as a local value in your environment, leave any shared value blank, and check exported files for the key before you share them. - A cheap first call.
GET /balancechecks the key without spending anything. A200means it works; a401means it's missing, malformed or revoked. - What a "no result" looks like. A detection can come back with
verdict: nulland areasonsuch astoo_short. That isn't an error, and your code shouldn't store it as a score of zero. - The error table. Look up the
errorcode there. For429 rate_limited, wait the number of seconds inRetry-Afterbefore trying again.
Before you write the client, send the request you'll make most often, one with a body that's too long, and one with a bad key. Save the responses. They make good test fixtures.
Send status alerts to your on-call team
Bookmark the AI Checker Humanizer status page before launch. If jobs back up, check the "REST API and MCP server" component alongside your queue wait times. The website has its own status.
Send updates somewhere your on-call team will see them. This page offers email, Slack, Microsoft Teams, and Atom or RSS feeds. Check the 90-day uptime chart and the past incidents list, too. A page with no history at all could mean a quiet service, or one that rarely posts.
Plan for the async part
Rewriting takes longer than one HTTP request should wait. This API answers POST /humanize with 202 Accepted and a taskId, and you poll GET /humanize/{taskId} until the task leaves queued or running.
The walkthrough on polling an async rewrite API from a Python job queue shows where to save the idempotency key and how the worker polls for the result. From it:
- Store an idempotency key on the job row before the first POST. If the POST times out, retry within 24 hours with the same key, text and options. If the API accepted the first request, you get its
taskIdback without a second charge; if it didn't, the retry is a new submission. - Two deadlines. A task still queued after 2 minutes fails with
queue_timeout. The text expires atexpiresAt, about 70 minutes after submission; after that, polling returns410 result_expiredfor a while and later404. Save the rewrite to your own database as soon as it's ready. - Keep the user's request short. Save the job, enqueue it, return. Let a worker do the polling.
A short checklist
Before the integration goes to review, I want answers to these:
- Where does the key live in each environment, and who can rotate it?
- Which responses mean "try again later", and do we honor
Retry-After? - What does the API return when it can't give a result, and how do we store that?
- Who gets the status page notifications?
- For async work, what's the longest a job can wait, and when does the result disappear?
If you can't answer one of these from the docs, ask the vendor before you ship.

