Docs menu認証方法
認証方法
APIキーによる認証
開発者向けリクエストには、TurnitPassのワークスペースで生成されたAPIキーを使用します。
Auth console
Keep API keys out of the browser.
TurnitPass API calls use a workspace-owned Bearer key. The key belongs in server-only code, while the dashboard remains the place to create, rotate, revoke, and inspect usage.
Key guardrails
How to keep access safe
Server only
Send keys from backend routes, workers, jobs, or secure server actions.
Shown once
Copy the generated key immediately and store it in your secret manager.
Rotate safely
Deploy the replacement key before revoking the old production key.
Account scoped
Usage rolls up to the workspace word balance and billing controls.
Bearer request
Header contract
fetch('https://turnitpass.com/api/v1/humanize', {
method: 'POST',
headers: {
Authorization: 'Bearer tp_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ text: draft, language: 'en' })
}){
"error": "Invalid or revoked API key.",
"code": "invalid_api_key"
}API keys
各リクエストにAPIキーを含めて送信します。キーは作成時に一度だけ表示され、ワークスペースからいつでも無効化できます。
Authorization: Bearer tp_live_your_api_key
Content-Type: application/json
POST /api/v1/humanizeManaging keys
Create
Generate a named key from the workspace and copy it immediately.
Revoke
Disable a key instantly. Revoked keys cannot be used for new requests.
Rate limits
Each key can be rate-limited independently while usage rolls up to the account.
Billing
All keys share the account word balance and subscription limits.
Workspace owned
Key lifecycle
Create a named key
Use a name that describes the environment or app surface, such as Production backend, Staging worker, or Internal QA.
Copy it once into a secret store
TurnitPass displays the key only at creation. Store it in your deployment provider, CI secret manager, or local .env file.
Watch usage through status and billing
All keys share the account word balance, while individual key names make it easier to find which integration is active.
Rotate before revoking
Create a replacement key, deploy it, confirm traffic is healthy, then revoke the old key from the workspace.
Environment setup
Store TurnitPass keys as server-only secrets. The examples below use generic names so they can fit Next.js, Workers, server jobs, or any backend runtime.
TURNITPASS_API_KEY=tp_live_your_api_key
TURNITPASS_API_BASE_URL=https://turnitpass.com/api/v1Security best practices
Authentication errors
{
"error": "Invalid or revoked API key.",
"code": "invalid_api_key"
}