Obtaining Your API Key
Create or log in to your Strata Cloud Manager account. Grab your account’s API key from the “Settings” page. Based on your access level, you might see the relevant permissions on the API key modal - tick the ones you’d like, name your API key, and save it.JWT-based Authentication
You can also authenticate the AI Gateway using JWT Tokens. Learn more here
Using Your API Key
REST API
- cURL
OpenAI SDK
When integrating the AI Gateway through the OpenAI SDK, modify the base URL and add theAuthorization header for authentication. Here’s an example of how to do it:
Gateway headers go in the SDK’s
defaultHeaders / default_headers parameter. Most requests
need only x-portkey-provider, and even that is unnecessary when you prefix the model with the
provider slug — "model": "@openai-prod/gpt-4o".- NodeJS
- Python
JWT-based Authentication
The AI Gateway supports JWT-based authentication as a secure alternative to API Key authentication. With JWT authentication, clients can authenticate API requests using a JWT token that is validated against a configured JWKS (JSON Web Key Set). This enterprise-grade authentication method is available as an add-on to any AI Gateway plan. JWT authentication provides enhanced security through:- Temporary, expiring tokens
- Fine-grained permission scopes
- User identity tracking
- Centralized authentication management
JWT Token Authentication
Learn how to implement JWT-based authentication with the AI Gateway
Interested in adding JWT authentication to your AI Gateway plan?Contact our sales team to discuss pricing and implementation details.

