[GH-ISSUE #20724] feat: How to provide OpenAI API key in picture_description_api JSON configuration? (Docling) #19274

Closed
opened 2026-04-20 01:40:44 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @a-meno on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20724

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

Hi OpenWebUI team 👋
First of all, thanks for the great work on OpenWebUI and the Docling integration.

I’m currently configuring Docling inside OpenWebUI and trying to enable image description using OpenAI (do_picture_description = true).
Docling allows passing a picture_description_api object via JSON configuration, but it is unclear how the OpenAI API key should be provided in this setup.


Environment

  • OpenWebUI: latest (container-based deployment)
  • Docling: integrated via OpenWebUI
  • Deployment: Docker / OCI Container Instance
  • LLM provider for image description: OpenAI

Current configuration

{
  "do_ocr": false,
  "pdf_backend": "dlparse_v4",
  "table_mode": "accurate",
  "pipeline": "standard",
  "do_picture_description": true,
  "picture_description_api": {
    "url": "https://api.openai.com/v1/chat/completions",
    "params": {
      "model": "gpt-4.1-mini"
    },
    "timeout": 60,
    "prompt": "Describe this image in great details."
  }
}

Observed behavior

When Docling tries to call the OpenAI API, the following error is returned:

You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth

Desired Solution you'd like

Expected behavior

Clear and documented guidance on how to provide the OpenAI API key when using picture_description_api, for example:

  • whether the key must be injected via environment variables
  • whether custom HTTP headers (e.g. Authorization: Bearer ...) are supported in the JSON config
  • whether Docling can reuse the OpenWebUI OpenAI provider configuration

Questions

  1. What is the officially supported way to provide the OpenAI API key for picture_description_api?
  2. Are custom HTTP headers supported in the Docling JSON configuration when used through OpenWebUI?
  3. Is there a recommended way to avoid hardcoding secrets in JSON while still enabling image description?

Why this matters

This affects:

  • containerized deployments (Docker / OCI / Kubernetes)
  • enterprise setups with strict secret management policies
  • multimodal pipelines where image description is required

Clear documentation or an example configuration would greatly improve usability and security.

Alternatives Considered

No response

Additional Context

Happy to help test, document, or contribute a PR if guidance is provided.

Thanks for your time and for maintaining OpenWebUI 🙏

Originally created by @a-meno on GitHub (Jan 16, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20724 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description Hi OpenWebUI team 👋 First of all, thanks for the great work on OpenWebUI and the Docling integration. I’m currently configuring **Docling** inside OpenWebUI and trying to enable **image description** using OpenAI (`do_picture_description = true`). Docling allows passing a `picture_description_api` object via JSON configuration, but it is unclear how the **OpenAI API key** should be provided in this setup. --- ### **Environment** * OpenWebUI: latest (container-based deployment) * Docling: integrated via OpenWebUI * Deployment: Docker / OCI Container Instance * LLM provider for image description: OpenAI --- ### **Current configuration** ```json { "do_ocr": false, "pdf_backend": "dlparse_v4", "table_mode": "accurate", "pipeline": "standard", "do_picture_description": true, "picture_description_api": { "url": "https://api.openai.com/v1/chat/completions", "params": { "model": "gpt-4.1-mini" }, "timeout": 60, "prompt": "Describe this image in great details." } } ``` --- ### **Observed behavior** When Docling tries to call the OpenAI API, the following error is returned: ``` You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth ``` ### Desired Solution you'd like ### **Expected behavior** Clear and documented guidance on how to provide the OpenAI API key when using `picture_description_api`, for example: * whether the key must be injected via environment variables * whether custom HTTP headers (e.g. `Authorization: Bearer ...`) are supported in the JSON config * whether Docling can reuse the OpenWebUI OpenAI provider configuration --- ### **Questions** 1. What is the officially supported way to provide the OpenAI API key for `picture_description_api`? 2. Are custom HTTP headers supported in the Docling JSON configuration when used through OpenWebUI? 3. Is there a recommended way to avoid hardcoding secrets in JSON while still enabling image description? --- ### **Why this matters** This affects: * containerized deployments (Docker / OCI / Kubernetes) * enterprise setups with strict secret management policies * multimodal pipelines where image description is required Clear documentation or an example configuration would greatly improve usability and security. ### Alternatives Considered _No response_ ### Additional Context Happy to help test, document, or contribute a PR if guidance is provided. Thanks for your time and for maintaining OpenWebUI 🙏
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#19274