Connect your code through Polyscribe API
Polyscribe API allows you to integrate Polyscribe into your own app, allowing your agents to Bypass AI detection and write in your selected writing style.
curl https://api.polyscribe.io/v1/rewrite \
-H "Authorization: Bearer ps_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Artificial intelligence has fundamentally transformed modern business operations.",
"style": "casual"
}'Quickstart
- 1
Create a key
Open API keys in your account and create one. It is shown once, so copy it into your environment before closing the dialog.
- 2
Send a request
POST the text to
https://api.polyscribe.io/v1/rewritewith the key in an Authorization header. The call blocks until the rewrite is done, which usually takes a few seconds. - 3
Read the result
The response carries the rewritten
text, what it cost and what is left.
Authentication
Every request carries your key as a bearer token. Keys are created and revoked on the API keys page, and each one looks like ps_live_xxxxxxxx.
Authorization: Bearer ps_live_YOUR_KEY- A key is shown once, when you create it. Only a hash is stored, so it cannot be recovered later. Lose it and you make another.
- Create as many as you like, one per service, and revoke any of them without touching the rest.
- The API is part of the paid plans. A free account can create a key and wire it up, and calls answer 403 until it subscribes.
- Keys survive a lapsed subscription. They stop working while it lasts and start again when it is fixed.
Rewrite text
POST/v1/rewrite
Submits the text and waits for the result. This is the one most integrations want.
| Parameter | Type | Description |
|---|---|---|
| text | string | The text to rewrite. Required, up to 10,000 characters. |
| style | string | Which writing style to use. Defaults to "casual". See Writing styles. |
curl https://api.polyscribe.io/v1/rewrite \
-H "Authorization: Bearer ps_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Artificial intelligence has fundamentally transformed modern business operations.",
"style": "casual"
}'Response
{
"id": "rw_8241",
"status": "ready",
"text": "AI has completely changed how businesses work.",
"style": "casual",
"characters": 79,
"credits_used": 1,
"credits_remaining": 1247,
"created_at": "2026-09-22T10:31:04.882Z"
}If the engine is slow
A rewrite that runs past 60 seconds returns 504rather than holding the connection open. The body carries the rewrite's id, and the work is still running, so collect it from GET /v1/rewrites/{id} instead of sending it again. Submitting twice would cost twice.
Long jobs
POST/v1/rewrites
GET/v1/rewrites/{id}
The same submit without the waiting. Useful for long text, batch jobs, or anything running somewhere a minute-long request is awkward. The submit answers 202 immediately with an id; poll it until status is ready.
| Status | Meaning |
|---|---|
| processing | Still running. Poll again in a second or two. |
| ready | Done. The rewritten text is on the text field. |
| failed | It did not finish. Credits were returned, and error says why. |
# Submit, and get an id back straight away.
curl https://api.polyscribe.io/v1/rewrites \
-H "Authorization: Bearer ps_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Artificial intelligence has fundamentally transformed modern business operations.", "style": "witty"}'
# {"id": "rw_8241", "status": "processing", ...}
# Then poll until it is ready.
curl https://api.polyscribe.io/v1/rewrites/rw_8241 \
-H "Authorization: Bearer ps_live_YOUR_KEY"Writing styles
GET/v1/styles
The style parameter takes one of two things, and they never collide:
- A built-in style, by name:
casual,engaging,wittyand the rest. - A style Polyscribe trained on your own writing, by its id:
style_7.
Omit it and you get casual. Ask for a style your plan does not cover and the call answers 402; ask for one that is still being trained and it answers 409, which is worth retrying in a few minutes.
curl https://api.polyscribe.io/v1/styles \
-H "Authorization: Bearer ps_live_YOUR_KEY"{
"styles": [
{ "id": "casual", "name": "Casual", "type": "builtin", "available": true },
{ "id": "style_7", "name": "My newsletter voice", "type": "custom",
"status": "ready", "available": true }
]
}Account
GET/v1/me
Your plan and what is left on it. Free to call and useful for showing your own users a balance.
{
"plan": { "id": "tier_1250", "name": "1,250 credits monthly" },
"credits_remaining": 1247,
"chars_per_credit": 500,
"max_characters_per_rewrite": 10000
}Errors
Every failure has the same shape, whatever went wrong. Switch on type for the broad case and code when you need the precise one.
{
"error": {
"type": "payment_required",
"code": "credits_short",
"message": "This rewrite costs 3 credits and your balance is short."
}
}| Status | Type | When |
|---|---|---|
| 400 | invalid_request | No text, over 10,000 characters, or a style that does not exist. |
| 401 | authentication_error | The key is missing, malformed, unknown or revoked. |
| 402 | payment_required | Out of credits, the last payment failed, or the style needs a higher plan. |
| 403 | plan_required | The account is on the free plan. Subscribe and the same key starts working. |
| 404 | not_found | No rewrite with that id, or no such endpoint. |
| 409 | conflict | The writing style you asked for is still being built. |
| 429 | rate_limited | Over 60 requests a minute. Retry-After says how long to wait. |
| 502 | engine_error | The rewrite did not finish. Credits were returned. |
| 504 | timeout | A sync rewrite ran past 60 seconds. The body carries its id, so collect it. |
Rate limits
Sixty requests a minute per key, the same on every plan. Going over answers 429 with a Retry-After header saying how long to wait.
The limit exists to stop a loop with a bug in it, not to price the product. Credits are what meter your usage, and they are the same credits the app spends. If sixty a minute is genuinely not enough, get in touch rather than sharding across keys.
Credits
A rewrite costs one credit for every 500 characters of the text you send, rounded up. A 1,200 character draft is 3 credits. The rewritten text does not add to it, so the price is known before you call.
- Charged when you submit, not when it finishes.
- Returned in full if the rewrite fails, to the same balance they came from.
- Up to 10,000 characters a request, on every plan. Split anything longer.
- API rewrites appear in your history in the app, marked as coming from a key, so you can see what yours has been doing.
Put it in your product this afternoon
One endpoint, a key you create in a minute, and the same writing styles your team already uses in the app.
Get an API key