Browse documentation
Authenticate with Bearer API keys
Send your API key as a Bearer token in the Authorization header of every request.
Request header
Authorization
Authorization: Bearer tp_live_your_api_key
Content-Type: application/json
Request
await fetch('https://turnitpass.com/api/v1/humanize', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TURNITPASS_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ text: draft, language: 'en' })
});
Managing keys
Create
Name a key in the workspace. Up to 5 active keys per account.
Revoke
A revoked key stops working immediately. Other keys keep working.
Environment setup
.env
TURNITPASS_API_KEY=tp_live_your_api_key
TURNITPASS_API_BASE_URL=https://turnitpass.com/api/v1
Security best practices
Authentication errors
Response
{
"error": "invalid_api_key",
"code": "invalid_api_key",
"message": "Invalid or revoked API key."
}