‘Empty file’ when attaching a PDF while using a saved Prompt (prompt_id) in Responses API (works when using model name

Hi OpenAI team, I’m seeing an issue when I attach a PDF and call the Responses API using a saved Prompt via prompt: { id, version }.

Issue

  • When I call client.responses.create() using a saved prompt reference (prompt.id + prompt.version) and include a PDF as input_file, the request fails with: “Empty file”.
  • If I run the same request but skip the saved prompt and use the model name directly (e.g., model="gpt-5-nano"), the PDF is processed correctly.
  • This also reproduces in the OpenAI Playground when using a saved prompt.

Why this matters
In my application I need to call the saved prompt because it contains pre-configured tools/settings. Using the model directly is not a practical workaround.

Repro steps

  1. Create/use any saved prompt in the platform

  2. Send a Responses API request including:

    • prompt: { id: "<saved_prompt_id>", version: "<version>" }

    • input with:

      • an input_text question
      • a PDF attached via input_file (filename + file_data data URL)
  3. Observe the API returns “Empty file”

  4. Repeat the request using model="<model_name>" instead of prompt

  5. Observe the request succeeds and the PDF is read normally

Expected behavior
File attachments should work the same way whether the request uses a saved prompt reference (prompt.id/version) or a direct model.

Actual behavior
When using prompt.id/version, the attached PDF is treated as empty and the API returns “Empty file”.

Minimal example (Python)

from openai import OpenAI
client = OpenAI()

response = client.responses.create(
  prompt={
    "id": "<saved_prompt_id>",
    "version": "<saved_prompt_version>"
  },
  input=[
    {
      "role": "user",
      "content": [
        {"type": "input_text", "text": "What is this file?"},
        {
          "type": "input_file",
          "filename": "example.pdf",
          "file_data": "data:application/pdf;base64,..."
        }
      ]
    }
  ],
  tools=[],
  store=True
)

Has anyone encountered this? Is there a known limitation/bug with input_file when using saved prompts via prompt.id/version, or any recommended workaround?