Deploy and secure your API globally with Unkey and Koyeb.
Koyeb is a developer-friendly serverless platform to deploy apps globally. Koyeb offers a fully managed environment to deploy any apps in seconds without managing any infrastructure. Koyeb supports any programming languages, frameworks, and tools to build your apps.
This example shows how to build an API using Bun, secure it with Unkey, and deploy it globally on Koyeb.
1bun install
1bun run dev
1curl -X POST http://localhost:8000 -H "Authorization: Bearer <KEY>"
Replace the UNKEY_ROOT_KEY
environment variable with your actual root key from your Unkey dashboard.
Then hit the Deploy
button.
Koyeb will deploy your app in your selected regions and provide a unique URL to access it, or you can configure your own custom domain.
Now that your app is deployed, you can test it:
1curl -X POST https://<YOUR_APP_NAME>-<YOUR_KOYEB_ORG>.koyeb.app -H "Authorization: Bearer <UNKEY_API_KEY>"
It should return a 200
status code with the Unkey verification response:
1{2 "meta": {3 "requestId": "req_123"4 },5 "data": {6 "valid": true,7 "code": "VALID",8 "keyId": "key_123",9 "name": "my-api-key"10 }11}
UNKEY_ROOT_KEY
. You can find this in the Unkey dashboard.150,000 requests per month. No CC required.