GUI API key button

Hello,
I’m slightly confused and hopefully somebody can clarify.
I’ve used the docker image and also built myself from the git repo, but there is no setapikey icon to use API key on the web interface.

What am I missing?

I don’t think there is any GUI to set an API key, just to use one. LibreTranslate currently doesn’t have a login method for administrators (or anyone else) so API keys must be generated from the command line.

The button is hidden if you don’t set --api-keys when launching the application. By default the instance is wide open without restrictions.

1 Like

I have it set in my docker-compose.yml but it still doesn’t show the button on the web page

    environment:
      - LT_API_KEYS
      - LT_REQUIRE_API_KEY_ORIGIN
      - LT_REQ_LIMIT=20

Did you set:

export LT_API_KEYS=YES

In your environment before launching docker-compose?

1 Like

Thank you, this was the solution. I have the API button in gui now.

    environment:
      - LT_API_KEYS=True
      - LT_REQUIRE_API_KEY_ORIGIN=True
      - LT_REQ_LIMIT=20

1 Like

I’m stuck with a similar problem, would you mind sharing your docker-compose.yml file?