Source: https://eugeneplexus.com/guides/serve-the-model-api-on-your-own-name

[Guides](https://eugeneplexus.com/guides) · v0.3.0

# Serve the model API on your own name

Put the console and Workbench on two HTTPS names, turn on the model API for other apps, and keep an old hostname while clients move.

-   Passes automated tests · not yet tried by a person: Let's Encrypt with a real certificate authority
-   Not yet tried: the Traefik recipe
-   Passes automated tests · not yet tried by a person: two hostnames with a real domain and proxy

“Passes automated tests” means it is built and checked by our test suite against stand-ins for the outside service. Nobody has yet tried it by hand with the real one, so tell us how it goes.

Eugene can answer on two HTTPS names on one port: `eugene.<your domain>` for the console and sign-in, and `workbench.<your domain>` for Workbench. The model API can sit on the first, at `https://eugene.<your domain>/inference/v1`. It is off until you turn it on.

1.  Follow [Serve the container on one HTTPS port](https://eugeneplexus.com/guides/container-https) as far as **Settings → Container access setup**. It covers **Who manages HTTPS?**, **Base domain**, **Public HTTPS port** and the certificates.
2.  Under **Where do you open the console?**, keep **Through this setup too** (recommended). In **Allowed private networks**, list the home, office or VPN networks that may connect.
3.  Tick **Enable the model API for other apps**. Under **Model API address**, choose **Use Eugene’s address (recommended)**. The address it shows is the one to give your apps.
4.  Leave **Allow inference from any network, with an API key** unticked unless apps connect from outside your private networks.
5.  Press **Prepare setup**, read **Your prepared setup**, then **Apply…** and **Apply and restart**.
6.  In the app, use that address as the base URL. Make a key under **Use it from your apps** on Home.

## Keep an old inference hostname while clients move

If you already have a separate inference hostname, choose **Use Eugene’s address (recommended)** and tick **Keep the existing inference address working during migration**. Its network rules stay as they were. Prepare and apply. When every client uses the new address, open the page again, untick it, and apply once more.

**Good to know**

-   With the model API off, `/inference/v1` is refused and does not fall through to the console. The console’s Engines page at `/inference/` keeps working.
-   Model API requests still need an Eugene key, and its model permissions and limits apply. The network rules for the API are separate from those for the console.
-   A setup made before v0.3.0 keeps its saved hostnames, console placement and network rules.
-   Sign-in uses `https://eugene.<your domain>/oidc` unless you saved another address. See [sign-in with Google or Microsoft](https://eugeneplexus.com/guides/sign-in-with-google-or-microsoft).
-   Keep the control root’s port published while joined machines use it. This setup does not change their saved address.
-   Preparing a setup changes nothing. If you do not sign in again within 15 minutes of applying, Eugene goes back to how it was.

Something different on your screen? [Tell us on GitHub](https://github.com/eugene-plexus/specs/issues/new?title=Guide%3A%20Serve%20the%20model%20API%20on%20your%20own%20name), with your version and what you saw.

[All guides](https://eugeneplexus.com/guides)
