[GH-ISSUE #15473] Ollama API failing while CLI works, without any difference #9890

Open
opened 2026-04-12 22:44:46 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @matteoberla on GitHub (Apr 10, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15473

Hi, I'm experiencing a strage behavior with API and CLI.

I'm trying to use deepseek-ocr to extract text from an image.
-CLI: ollama run deepseek-ocr "/Users/sasoftware/Downloads/image.png\nExtract text in markdown."
works fine and extract text without any problem.

-API: I'm calling localhost:11434/api/generate with this body:

{
    "model": "deepseek-ocr:latest",
    "prompt": "Read this receipt image and extract all the texts in MARKDOWN.",
    "stream": false,
    "images": [
        "iVBORw0....ElFTkSuQmCC"
    ]
}

but I'm receiving this response:

{
    "model": "deepseek-ocr:latest",
    "created_at": "2026-04-10T10:08:43.783512Z",
    "response": ")。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n",
    "done": false
}

How can it be possible? Do I have to specify other params inside the request body?
I've tried with many more images but only this one has this type of problem. Any suggestion would be really useful.

Image link on gDrive
and you can extract base64 from here

Mac mini M4 Pro 24GB

Originally created by @matteoberla on GitHub (Apr 10, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15473 Hi, I'm experiencing a strage behavior with API and CLI. I'm trying to use deepseek-ocr to extract text from an image. -CLI: `ollama run deepseek-ocr "/Users/sasoftware/Downloads/image.png\nExtract text in markdown."` works fine and extract text without any problem. -API: I'm calling `localhost:11434/api/generate` with this body: ``` { "model": "deepseek-ocr:latest", "prompt": "Read this receipt image and extract all the texts in MARKDOWN.", "stream": false, "images": [ "iVBORw0....ElFTkSuQmCC" ] } ``` but I'm receiving this response: ``` { "model": "deepseek-ocr:latest", "created_at": "2026-04-10T10:08:43.783512Z", "response": ")。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n)。\n\n", "done": false } ``` How can it be possible? Do I have to specify other params inside the request body? I've tried with many more images but only this one has this type of problem. Any suggestion would be really useful. [Image link on gDrive](https://drive.google.com/file/d/1L3lTgV60Ofc_lZY5DBNbxtqniPd2zayZ/view?usp=sharing) and you can extract base64 from [here](https://base64.guru/converter/encode/image) Mac mini M4 Pro 24GB
GiteaMirror added the bug label 2026-04-12 22:44:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#9890