Rephrase

API documentation

Rephrase API

Humanize your AI texts from your scripts, your products, your automations (n8n, Make, Zapier). Same credits as on the web, no extra subscription.

TL;DR

  1. 1. Create an account and buy a credit pack.
  2. 2. Generate an API key from /dashboard/api-keys.
  3. 3. Send your text with a POST to /v1/api/humanize with the header Authorization: Bearer rph_live_....
  4. 4. Get the humanized text back as JSON. Cost: 1 credit per 100 words.

1. Base URL

Every public request starts from:

https://api.rephrase.fr

All API endpoints are prefixed with /v1/api/. The API is versioned: v1 is stable and comes with at least 12 months of support after any breaking change.

2. Authentication

The API uses Bearer API keys. Create one from your dashboard, copy it once (it is never shown again), then pass it on every request:

Authorization: Bearer rph_live_xxxxxxxxxxxxxxxxxxxxxxxx

Key format: rph_live_ followed by 48 hex characters. Keys are unique and can be revoked at any time from your dashboard.

Never expose your key on the client side. Every request to the API must come from a backend you control. A key leaked in a JavaScript bundle must be revoked immediately.

3. Humanize a text

POST/v1/api/humanize

Parameters (JSON body)

FieldTypeRequiredDescription
inputTextstringrequiredText to humanize (3 to 8,000 words).
presetSlugstringoptionalSlug of a preset. See GET /v1/public/presets.
customVoiceIdnumberoptionalID of a custom voice. Create it via POST /v1/api/voices.

curl example

curl -X POST https://api.rephrase.fr/v1/api/humanize \
  -H "Authorization: Bearer rph_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "inputText": "Il est important de noter que...",
    "presetSlug": "web_article_seo"
  }'

Node.js example (fetch)

js
const res = await fetch('https://api.rephrase.fr/v1/api/humanize', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.REPHRASE_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    inputText: 'Votre texte IA ici...',
    presetSlug: 'web_article_seo'
  })
});

if (!res.ok) {
  const err = await res.json();
  throw new Error(err.error);
}

const data = await res.json();
console.log(data.output);

Python example (requests)

python
import os, requests

resp = requests.post(
    'https://api.rephrase.fr/v1/api/humanize',
    headers={
        'Authorization': f'Bearer {os.environ["REPHRASE_API_KEY"]}',
        'Content-Type': 'application/json'
    },
    json={
        'inputText': 'Votre texte IA ici...',
        'presetSlug': 'web_article_seo'
    }
)

resp.raise_for_status()
print(resp.json()['output'])

Response (200 OK)

json
{
  "humanizationId": 12345,
  "output": "Votre texte, humanisé et prêt à publier.",
  "creditsUsed": 3,
  "wordCount": 287,
  "balance": 197,
  "modelUsed": "rephrase-fr-balanced"
}
Automatic refund: if generation fails on the provider side (timeout, 5xx), credits are refunded. The response will be 502 provider_error with { refunded: 3 }.

4. Managing voices

A voice (Custom Voice) is a stylistic signature extracted from 3 to 5 of your texts. Once created, reuse it in every humanization via customVoiceId.

Create a voice

POST/v1/api/voicescost: 1 analysis credit
curl -X POST https://api.rephrase.fr/v1/api/voices \
  -H "Authorization: Bearer rph_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "moi-linkedin",
    "samples": [
      "Premier texte que j\'ai écrit, 100+ mots...",
      "Deuxième texte...",
      "Troisième texte..."
    ]
  }'

Constraints: 3 to 5 samples, 300 words minimum in total. Texts are encrypted at rest (AES-256-GCM) and are never sent to a subprocessor beyond the initial analysis.

List your voices

GET/v1/api/voices

5. Check your credits

GET/v1/api/me/credits
json
{
  "balance": 197,
  "lifetime_purchased": 500,
  "lifetime_used": 303,
  "lifetime_gifted": 3
}

6. Error codes

HTTP codeerrorMeaning
400invalid_bodyInvalid or missing body.
400text_too_shortText shorter than 3 words.
400text_too_longText longer than 8,000 words.
401unauthorizedAPI key invalid, missing or revoked.
402insufficient_creditsBalance too low for this request.
422content_filterContent rejected by the provider's moderation filter. No refund.
429rate_limitedToo many requests on the key. Wait 60 seconds.
502provider_errorAI provider failure. Credits are refunded automatically.
500internal_errorUnexpected error on the Rephrase side. Let us know.

7. Rate limits

30 requests per minute per API key, across all endpoints. If you go over, the API returns 429 rate_limited.

The standard response headers RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (IETF draft) are exposed. For high-volume usage, parallelize across several keys (1 per service/script).

8. Best practices

  • Store the key in an environment variable, never in your source code or a git repo. Use process.env.REPHRASE_API_KEY or the equivalent.
  • One key per service, not a shared key. If one service is compromised, you only revoke its own key.
  • Always check the HTTP code before handling the response. On a 502 provider_error, retry after 2-3 seconds (the credits have already been refunded).
  • Batch your requests in series, not in a massive parallel burst. 30 req/min is 1 every 2 seconds. For 1,000 texts, plan for about 35 minutes.
  • Watch your balance via GET /v1/api/me/credits in your long-running jobs, to get ahead of a 402 insufficient_credits.

Ready to integrate Rephrase?

Create an account in 30 seconds, no credit card. Buy a pack whenever you are ready.

Create an account