[GH-ISSUE #2900] [BUG]: Html instead of JSON in the api #1846

Closed
opened 2026-02-22 18:26:48 -05:00 by yindo · 0 comments
Owner

Originally created by @wouldbe12 on GitHub (Dec 25, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2900

How are you running AnythingLLM?

Docker (Ubuntu cloud server, but same problem when hosted locally in Docker on Windows 11)

What happened?

I am currently experiencing an issue while trying to access the AnythingLLM API hosted on a Docker instance running on an Ubuntu server. Whenever I send a request to the chat endpoint, I receive an HTML response instead of the expected JSON format.

Here are the details of my request:

Endpoint: https://[myaddress]/v1/workspace/[name of workspace]/chat
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Payload:
json
{
"message": "my message",
"mode": "chat",
"sessionId": null,
"attachments": []
}
Despite receiving a 200 OK status code, the response is in HTML format, which leads to a JSON decoding error in my application.
Could you please provide guidance on how to properly assess the API of a Docker instance hosted on an Ubuntu server remotely? Additionally, any insights into why HTML might be returned instead of JSON would be greatly appreciated.

What are the correct endpoints and what could the problem be?

Thank you!

Are there known steps to reproduce?

No response

Originally created by @wouldbe12 on GitHub (Dec 25, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2900 ### How are you running AnythingLLM? Docker (Ubuntu cloud server, but same problem when hosted locally in Docker on Windows 11) ### What happened? I am currently experiencing an issue while trying to access the AnythingLLM API hosted on a Docker instance running on an Ubuntu server. Whenever I send a request to the chat endpoint, I receive an HTML response instead of the expected JSON format. Here are the details of my request: Endpoint: https://[myaddress]/v1/workspace/[name of workspace]/chat Headers: Authorization: Bearer YOUR_API_KEY Content-Type: application/json Payload: json { "message": "my message", "mode": "chat", "sessionId": null, "attachments": [] } Despite receiving a 200 OK status code, the response is in HTML format, which leads to a JSON decoding error in my application. Could you please provide guidance on how to properly assess the API of a Docker instance hosted on an Ubuntu server remotely? Additionally, any insights into why HTML might be returned instead of JSON would be greatly appreciated. What are the correct endpoints and what could the problem be? Thank you! ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:26:48 -05:00
yindo closed this issue 2026-02-22 18:26:49 -05:00
yindo changed title from [BUG]: Html instead of JSON in the api to [GH-ISSUE #2900] [BUG]: Html instead of JSON in the api 2026-06-05 14:43:02 -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#1846