Authentication
How to authenticate with the YepAPI using your API key.
API Key Authentication
All requests to YepAPI require an API key passed via the x-api-key header.
curl https://api.yepapi.com/v1/seo/keywords \
-H "x-api-key: yep_sk_abc123..."Authorization: Bearer <key> works too, so OpenAI SDKs and other clients that only send a bearer token can call YepAPI unchanged. If a request sends both, x-api-key is used.
curl https://api.yepapi.com/v1/seo/keywords \
-H "Authorization: Bearer yep_sk_abc123..."Identify Your App (optional)
Tell us which app a request comes from by adding up to three optional headers. They work on every endpoint, cost nothing, and are saved with each request in your usage logs, so you can tell your apps apart when several share one account.
| Header | What to send | Max length |
|---|---|---|
X-App-Name | Your app's name | 100 characters |
X-App-Website | Your app's URL | 300 characters |
X-App-Description | A short description of what your app does | 500 characters |
curl https://api.yepapi.com/v1/seo/keywords \
-H "x-api-key: yep_sk_abc123..." \
-H "X-App-Name: Rank Tracker" \
-H "X-App-Website: https://ranktracker.example.com" \
-H "X-App-Description: Daily keyword rank reports for agencies" \
-H "Content-Type: application/json" \
-d '{"keywords": ["nextjs seo"]}'If your code already sends OpenRouter's X-Title and HTTP-Referer headers, those are read as the app name and website too. When both are present, X-App-Name and X-App-Website win.
All three headers are optional. Requests without them work exactly the same.
Getting Your API Key
- Sign up at app.yepapi.com
- You'll receive $5.00 free balance immediately (AI models unlock after your first top-up)
- Your API key is available on the dashboard
API keys follow the format: yep_sk_ followed by a random string.
Never expose your API key in client-side code. Always make API calls from your server or serverless functions.
Using with fetch
const res = await fetch('https://api.yepapi.com/v1/seo/keywords', {
method: 'POST',
headers: {
'x-api-key': process.env.YEP_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({ keywords: ['nextjs seo'] }),
});
const { ok, data, error } = await res.json();