[PR #14457] docs: clarify streaming format as JSONL and document error responses #61379

Open
opened 2026-04-29 16:27:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14457
Author: @Anandesh-Sharma
Created: 2/26/2026
Status: 🔄 Open

Base: mainHead: docs-api-improvements


📝 Commits (1)

  • 0f900c1 docs: clarify streaming format as JSONL and document error responses

📊 Changes

1 file changed (+20 additions, -1 deletions)

View changed files

📝 docs/api.md (+20 -1)

📄 Description

Summary

  • Specify that streaming endpoints return JSON Lines (JSONL) format where each JSON object is separated by a newline
  • Add error response documentation with example JSON body and common HTTP status codes table

Details

The API documentation previously stated streaming returns "a stream of JSON objects" without specifying the exact wire format. This clarifies it as JSONL, making it easier for client implementors to use line-buffered parsing.

Additionally, the API documentation had no section explaining how errors are reported. This adds documentation for the error JSON format and common HTTP status codes.

Test plan

  • Verified error format matches actual server behavior
  • Verified streaming format description is accurate

Fixes #7703
Fixes #9905

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14457 **Author:** [@Anandesh-Sharma](https://github.com/Anandesh-Sharma) **Created:** 2/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs-api-improvements` --- ### 📝 Commits (1) - [`0f900c1`](https://github.com/ollama/ollama/commit/0f900c1ec5c106b91ea271433321e7c5fbc4fdd6) docs: clarify streaming format as JSONL and document error responses ### 📊 Changes **1 file changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/api.md` (+20 -1) </details> ### 📄 Description ## Summary - Specify that streaming endpoints return [JSON Lines (JSONL)](https://jsonlines.org/) format where each JSON object is separated by a newline - Add error response documentation with example JSON body and common HTTP status codes table ## Details The API documentation previously stated streaming returns "a stream of JSON objects" without specifying the exact wire format. This clarifies it as JSONL, making it easier for client implementors to use line-buffered parsing. Additionally, the API documentation had no section explaining how errors are reported. This adds documentation for the error JSON format and common HTTP status codes. ## Test plan - [x] Verified error format matches actual server behavior - [x] Verified streaming format description is accurate Fixes #7703 Fixes #9905 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 16:27:21 -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#61379