[GH-ISSUE #405] LocalAI API Key needed #229

Closed
opened 2026-02-22 18:18:25 -05:00 by yindo · 7 comments
Owner

Originally created by @lunamidori5 on GitHub (Dec 2, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/405

For my copy of localai we need a place to put in api keys, is there a way to do that?

Originally created by @lunamidori5 on GitHub (Dec 2, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/405 For my copy of localai we need a place to put in api keys, is there a way to do that?
yindo added the feature request label 2026-02-22 18:18:25 -05:00
yindo closed this issue 2026-02-22 18:18:25 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 3, 2023):

Can you point me to where in the documentation LocalAI supports API keys - or is this a custom wrapper around the LocalAI API that you run in front of the service?

If this is a custom wrapper what API schema do you support? Authorization: Bearer or X-API-Key: xxxxx type?

@timothycarambat commented on GitHub (Dec 3, 2023): Can you point me to where in the documentation LocalAI supports API keys - or is this a custom wrapper around the LocalAI API that you run in front of the service? If this is a custom wrapper what API schema do you support? `Authorization: Bearer` or `X-API-Key: xxxxx` type?
Author
Owner

@Amejonah1200 commented on GitHub (Dec 3, 2023):

Technically, you could just add a "header name" and "header value" field for that purpose. Then it wouldn't matter which of the formats it is.

@Amejonah1200 commented on GitHub (Dec 3, 2023): Technically, you could just add a "header name" and "header value" field for that purpose. Then it wouldn't matter which of the formats it is.
Author
Owner

@timothycarambat commented on GitHub (Dec 3, 2023):

Well sure, we do that for Chroma, I'm more just curious on if that is supported by LocalAI or not since I dont ever recall seeing it :)

@timothycarambat commented on GitHub (Dec 3, 2023): Well sure, we do that for Chroma, I'm more just curious on if that is supported by LocalAI or not since I dont ever recall seeing it :)
Author
Owner

@lunamidori5 commented on GitHub (Dec 3, 2023):

@timothycarambat I got it working by editing these two files, but you will need to set your env file to read only if you do it this way
index.js.txt
index.js.txt

@lunamidori5 commented on GitHub (Dec 3, 2023): @timothycarambat I got it working by editing these two files, but you will need to set your env file to read only if you do it this way [index.js.txt](https://github.com/Mintplex-Labs/anything-llm/files/13541200/index.js.txt) [index.js.txt](https://github.com/Mintplex-Labs/anything-llm/files/13541204/index.js.txt)
Author
Owner

@lunamidori5 commented on GitHub (Dec 3, 2023):

Can you point me to where in the documentation LocalAI supports API keys - or is this a custom wrapper around the LocalAI API that you run in front of the service?

If this is a custom wrapper what API schema do you support? Authorization: Bearer or X-API-Key: xxxxx type?

its the same as openai... if you add "API_KEY=" to your env file on docker setup, it will check for those keys on every request!

@lunamidori5 commented on GitHub (Dec 3, 2023): > Can you point me to where in the documentation LocalAI supports API keys - or is this a custom wrapper around the LocalAI API that you run in front of the service? > > If this is a custom wrapper what API schema do you support? `Authorization: Bearer` or `X-API-Key: xxxxx` type? its the same as openai... if you add "API_KEY=" to your env file on docker setup, it will check for those keys on every request!
Author
Owner

@lunamidori5 commented on GitHub (Dec 4, 2023):

(link from the docs that says it supports api keys) - https://localai.io/basics/getting_started/

@lunamidori5 commented on GitHub (Dec 4, 2023): (link from the docs that says it supports api keys) - https://localai.io/basics/getting_started/
Author
Owner

@timothycarambat commented on GitHub (Dec 4, 2023):

TIL! I very much missed that. Thank you for that. Will work on this

@timothycarambat commented on GitHub (Dec 4, 2023): TIL! I very much missed that. Thank you for that. Will work on this
yindo changed title from LocalAI API Key needed to [GH-ISSUE #405] LocalAI API Key needed 2026-06-05 14:34:10 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#229