Share via

Azure Openai Responses API - File Input Not Working

Gareth Jayne 35 Reputation points
2026-06-03T21:22:43.0966667+00:00

Hi everyone

I'm trying to add files via the Azure Open AI responses API so my GPT5.1 model can answer questions about them. I'm using the instructions at the link below:

https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/responses?tabs=rest#file-input

However, whether I use the inline base64 method or the file upload method I get the following response from the model:

I don’t see the PDF file or its contents attached yet.\n\nPlease either:\n- Upload the PDF file, or \n- Paste its text (or screenshots) here,\n\nand I’ll provide a concise summary.

I'm not sure why this is happening as the file is being added with no errors but for some reason the model doesn't seem to see it. Has anyone tried using this and if so have you come across the same issue?

Thanks in advance for your help.

Azure OpenAI in Foundry Models

1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-03T21:23:06.0766667+00:00

    The model response indicates that the PDF isn’t actually being passed into the model’s input content, even though the file upload itself succeeds. For the Responses API, files must be both uploaded correctly and referenced in the request in a way that vision-capable models can consume.

    Key points to verify:

    1. Use a vision-capable model
    • Only models that support both text and image inputs can accept PDF files as input.
    • Ensure the deployment is one of the vision-enabled models listed under the Responses API (for example, gpt-4o or other models explicitly documented as supporting image/PDF input).
    • If a non-vision model is used, the PDF will not be interpreted and the model will behave as if no file was attached.
    1. Respect PDF size and request limits
    • Each PDF must be under 50 MB.
    • The combined size of all files in a single request must also be under 50 MB.
    • If limits are exceeded, the file will not be processed even if upload appears successful.
    1. Use the correct purpose when uploading files
    • For PDF input with the Responses API, the file must be uploaded with purpose="assistants".
    • A purpose of user_data is currently not supported for PDFs; using user_data will prevent the file from being usable by the Responses API.
    1. Ensure the file is actually referenced in the Response request
    • For inline Base64: the PDF must be included in the request content as a base64 data URI so that the model receives both extracted text and rendered page images.
    • For uploaded files: the file ID returned from the Files API must be referenced in the Responses API request in the way shown in the documentation (for example, as a file input in the content/tool configuration). If the file is only uploaded but never referenced by ID in the Response creation call, the model will not see it.
    1. Combine file input with text
    • When using file inputs, include a text prompt in the same request (for example, “Summarize the attached PDF”). Some flows require that there is text content along with the file reference so the model has both the instruction and the file in a single call.
    1. Confirm the model supports PDFs (not just images)
    • PDF support is specifically called out for models with vision capabilities. If using a model or version that does not yet support PDF input, the file will be ignored.

    If all of the above are satisfied (vision-enabled model, purpose="assistants", size limits respected, file ID or base64 correctly embedded in the Response request, and a text instruction included), the model should receive both the extracted text and rendered images of each PDF page and be able to answer questions about the file instead of replying that it cannot see it.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.