Created
June 3, 2025 17:19
-
-
Save surfiend/70217e4835355045c31e492f084e1387 to your computer and use it in GitHub Desktop.
Ollama Vision API: Clean curl Example for Image Analysis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IMAGE_BASE64=$(base64 -w 0 'path/to/the/image') | |
| curl -X POST "http://localhost:11434/api/chat" -d @- << EOF | |
| { | |
| "model": "qwen3", | |
| "messages": [ | |
| { | |
| "role": "user", | |
| "content": "Describe this image.", | |
| "images": ["$IMAGE_BASE64"] | |
| } | |
| ], | |
| "options": { | |
| "num_ctx": 4096 | |
| }, | |
| "stream": false | |
| } | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment