Configuration
In this guide, we will look at how to configure Model Gateway and Admin Console.
If you are looking for information on how to configure your gateways, gateway API keys, and connect to your existing inference endpoints, you can find it in the Admin Console guide. If you are looking for information on how to manage and configure your Model Gateway using the Management API, you can find it in the Management API guide.
Model Gateway configuration
Model Gateway is configured using environment variables. The following environment variables are available to configure Model Gateway:
- Name
GATEWAY_PORT
- Default value
- Default: 4001
- Description
The last ID on the page you're currently on when you want to fetch the next page.
- Name
ADMIN_PORT
- Default value
- Default: 4000
- Description
The port exposing Management API. This is where you can connect with the Admin Console.
- Name
DATABASE_URL
- Description
The database connection URL.
- Name
PRISMA_FIELD_ENCRYPTION_KEY
- Description
Encryption key used to encrypt/decrypt your API keys. Can be generated at https://cloak.47ng.com.
- Name
JWT_SECRET
- Description
Random secret used to sign JWT.
- Name
ADMIN_EMAIL
- Description
Email address used for logging in.
- Name
ADMIN_PASSWORD
- Description
Password used for logging in.
- Name
CORS_ALLOWED_ORIGINS
- Description
(Optional) Comma separated Allowed Origins on
ADMIN_PORT
. (See CORS Cross-Origin Resource Sharing)
Admin Console configuration
Admin Console is configured using environment variables. Since Admin Console is using Next.js, all environment variables that are exposed to the browser are prefixed with NEXT_PUBLIC_
. This is to prevent leaking sensitive information to the client-side code. The following environment variables are available to configure Model Gateway Admin Console:
- Name
GRAPHQL_URL
- Description
URL of Model Gateway's GraphQL Management API, e.g. http://modelgw:4000/graphql
- Name
NEXT_PUBLIC_GATEWAY_URL
- Description
URL of Model Gateway's gateway endpoint. This is also where your AI app will connect. URL can be behind some other HTTP server or firewall or in Docker network, e.g. http://modelgw:4001.