Cannot find the location to create the Knowledge API Key. #20802

Closed
opened 2026-02-21 20:09:03 -05:00 by yindo · 1 comment
Owner

Originally created by @nodream1977 on GitHub (Dec 4, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I found the relevant Knowledge Base APIs in Dify, which allow for creating knowledge bases, managing knowledge bases, uploading files, and other operations via the APIs.
For this purpose, an API Key is required. In Dify version 1.1.3, I noticed that it is possible to apply for a single API Key that works for all knowledge base operations.

Image

However, this option is no longer available in version 1.10.1. It appears that you must first create a knowledge base before you can apply for an API Key specific to that particular knowledge base.

✔️ Expected Behavior

I hope to find an API Key that can be used to operate on all knowledge bases.

Actual Behavior

No response

Originally created by @nodream1977 on GitHub (Dec 4, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I found the relevant Knowledge Base APIs in Dify, which allow for creating knowledge bases, managing knowledge bases, uploading files, and other operations via the APIs. For this purpose, an API Key is required. In Dify version 1.1.3, I noticed that it is possible to apply for a single API Key that works for all knowledge base operations. <img width="2698" height="794" alt="Image" src="https://github.com/user-attachments/assets/d5a73cc3-d05c-4d6b-85a5-40e18454aa5a" /> However, this option is no longer available in version 1.10.1. It appears that you must first create a knowledge base before you can apply for an API Key specific to that particular knowledge base. ### ✔️ Expected Behavior I hope to find an API Key that can be used to operate on all knowledge bases. ### ❌ Actual Behavior _No response_
yindo added the 🙋‍♂️ question label 2026-02-21 20:09:03 -05:00
yindo closed this issue 2026-02-21 20:09:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 4, 2025):

Hi @nodream1977! I'm Dosu and I’m helping the dify team.

In Dify 1.10.1, there is no longer a universal API key for all knowledge bases. Instead, API keys are managed per knowledge base (dataset) or per external knowledge API. To create a Knowledge API Key, you first need to create the knowledge base or external knowledge API entry. Then, in the Dify UI, go to the relevant knowledge base or external API panel, and use the "Create New Secret Key" button (enabled only for users with editor or operator privileges) to generate a key specific to that resource. If you don't see the button, check your user role for the dataset or knowledge base. This per-resource API key model is intentional and there is no workaround for a universal key in recent versions (sourcecode reference). If you need to manage many knowledge bases, scripting repeated API calls is the recommended approach (source).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 4, 2025): <!-- Greeting --> Hi @nodream1977! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> In Dify 1.10.1, there is no longer a universal API key for all knowledge bases. Instead, API keys are managed per knowledge base (dataset) or per external knowledge API. To create a Knowledge API Key, you first need to create the knowledge base or external knowledge API entry. Then, in the Dify UI, go to the relevant knowledge base or external API panel, and use the "Create New Secret Key" button (enabled only for users with editor or operator privileges) to generate a key specific to that resource. If you don't see the button, check your user role for the dataset or knowledge base. This per-resource API key model is intentional and there is no workaround for a universal key in recent versions ([source](https://github.com/langgenius/dify/issues/26347), [code reference](https://github.com/langgenius/dify/blob/725d6b52a75721ac0aef85c68c34dcf7798521f5/web/app/components/datasets/external-api/external-api-panel/index.tsx)). If you need to manage many knowledge bases, scripting repeated API calls is the recommended approach ([source](https://github.com/langgenius/dify/issues/26229)). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/df16c5be-9f4c-4372-967f-ee3c2309f95a?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=In%20Dify%201.10.1%2C%20there%20is%20no%20longer%20a%20universal%20API%20key%20for%20all%20knowledge%20bases.%20Instead%2C%20API%20keys%20are%20managed%20per%20knowledge%20base%20%28dataset%29%20or%20per%20external%20knowledge%20API.%20To%20create%20a%20Knowledge%20API%20Key%2C%20you%20first%20need%20to%20create%20the%20knowledge%20base%20or%20external%20knowledge%20API%20entry.%20Then%2C%20in%20the%20Dify%20UI%2C%20go%20to%20the%20relevant%20knowledge%20base%20or%20external%20API%20panel%2C%20and%20use%20the%20%22Create%20New%20Secret%20Key%22%20button%20%28enabled%20only%20for%20users%20with%20editor%20or%20operator%20privileges%29%20to%20generate%20a%20key%20specific%20to%20that%20resource.%20If%20you%20don%27t%20see%20the%20button%2C%20check%20your%20user%20role%20for%20the%20dataset%20or%20knowledge%20base.%20This%20per-resource%20API%20key%20model%20is%20intentional%20and%20there%20is%20no%20workaround%20for%20a%20universal%20key%20in%20recent%20versions%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/26347%29%2C%C2%A0%5Bcode%20reference%5D%28https%3A//github.com/langgenius/dify/blob/725d6b52a75721ac0aef85c68c34dcf7798521f5/web/app/components/datasets/external-api/external-api-panel/index.tsx%29%29.%20If%20you%20need%20to%20manage%20many%20knowledge%20bases%2C%20scripting%20repeated%20API%20calls%20is%20the%20recommended%20approach%C2%A0%28%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/26229%29%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29154)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20802