Skip to main content

Agumbe AI Gateway base URL:

Step 1: Create an API key

Create a gateway API key from the Agumbe Console. Use this key from your backend service, worker, or local development environment.

Set it as an environment variable:

Step 2: Install the SDK

Agumbe AI Gateway is compatible with every major LLM provider out there, but for this example we will use the official OpenAI SDK.

For Node.js:

For Python:

Step 3: Send a chat request

Step 5: Choose a model

You can use a supported model ID or an Agumbe alias. Examples:
Use smart-default when you want Agumbe to choose the default general-purpose model for your application.

Step 6: Add guardrails when needed

If your API key is tenant-scoped, you can choose which app’s guardrails apply by passing agumbe_guardrails_app_id.
If your API key is app-scoped, the gateway applies the bound app’s guardrails automatically.
That’s it. Your application is now sending LLM traffic through Agumbe AI Gateway, with one endpoint for model access, policy enforcement, usage tracking, and observability.