Open router api key "Credentials validation failed with status code 404" #119

Closed
opened 2026-02-16 10:18:08 -05:00 by yindo · 1 comment
Owner

Originally created by @Morphus01 on GitHub (Mar 24, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Last

Cloud or Self Hosted

Self Hosted (Source), Self Hosted (Docker)

Steps to reproduce

Installed in windows and direct to insert the api key won't work due the rror

✔️ Expected Behavior

No response

Actual Behavior

Image

Originally created by @Morphus01 on GitHub (Mar 24, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version Last ### Cloud or Self Hosted Self Hosted (Source), Self Hosted (Docker) ### Steps to reproduce Installed in windows and direct to insert the api key won't work due the rror ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/9d49d7af-9791-40a0-8494-1b39a93aaea1)
yindo closed this issue 2026-02-16 10:18:08 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 24, 2025):

Hey @Morphus01! 👋 I'm here to help you with bugs, questions, and more while you wait for a human maintainer. Let's squash those bugs together!

I found a similar closed issue regarding the "Credentials validation failed with status code 404" error. The suggested solution is to ensure that the endpoint_url provided in the credentials is correct and points to a valid OpenAI API-compatible endpoint. The URL should end with a slash (/), and the specific paths for the endpoints should be correctly appended based on the mode (either chat/completions, completions, or embeddings). Additionally, verify that the API server is running and the endpoint is correctly configured to handle the requests [1].

For the correct format and structure of the endpoint_url in the Dify configuration for OpenRouter, it should be:

https://your-domain.com/e/{hook_id}

Replace your-domain.com with your actual domain, and {hook_id} will be dynamically replaced with the specific hook ID [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 24, 2025): <!-- Greeting --> Hey @Morphus01! 👋 I'm here to help you with bugs, questions, and more while you wait for a human maintainer. Let's squash those bugs together! <!-- Answer --> I found a similar closed issue regarding the "Credentials validation failed with status code 404" error. The suggested solution is to ensure that the `endpoint_url` provided in the credentials is correct and points to a valid OpenAI API-compatible endpoint. The URL should end with a slash (`/`), and the specific paths for the endpoints should be correctly appended based on the mode (either `chat/completions`, `completions`, or `embeddings`). Additionally, verify that the API server is running and the endpoint is correctly configured to handle the requests <sup>[[1]](https://github.com/langgenius/dify/issues/6027)</sup>. For the correct format and structure of the `endpoint_url` in the Dify configuration for OpenRouter, it should be: ``` https://your-domain.com/e/{hook_id} ``` Replace `your-domain.com` with your actual domain, and `{hook_id}` will be dynamically replaced with the specific hook ID <sup>[[2]](https://github.com/langgenius/dify/issues/15684)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b3e9f3b4-f51e-4b6c-8351-e4221bbdbb13?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#119