Outcome: Route OpenAI (or any supported provider) through your ManyLayers gateway using the standard OpenAI API. Takes about 5 minutes. This example uses OpenAI, but the same steps work for Anthropic, Azure OpenAI, Gemini, Bedrock, Cohere, and 14 other providers — just change the provider type and credentials.

Prerequisites

  • ManyLayers installed and running (see Installation)
  • An OpenAI API key
  • Your ManyLayers admin API key

Steps

1

Add the provider credentials

Register your OpenAI API key with ManyLayers. Your key is stored encrypted and never exposed in logs or responses.
2

Create a logical model

A logical model is the name your clients use to make requests. It maps to a specific provider and model. Your applications call gpt-4o — ManyLayers routes it to the right upstream.
3

Create a team and allow the model

Teams control which models each group of users can access. Create a team and add gpt-4o to its allow-list.
4

Create an API key for the team

Generate a key scoped to your team. This is what your applications will use to authenticate.
Save the returned key — it starts with ml- and cannot be retrieved again.
5

Make your first call

Use the standard OpenAI API format. Point the base URL at ManyLayers and use your team key.
You can also use the OpenAI SDK with a single base URL change:

What’s happening under the hood

Your request flows through auth, RBAC (checking your team’s model allow-list), rate limits, and then routes to OpenAI. The response is logged to the audit trail with token counts. You can see this in Metrics and Audit logs immediately.

Next steps