Share via

Responses API - Code Interpreter Unable to Retrieve Files

Developer 20 Reputation points
2025-08-07T14:31:03.19+00:00

I am able to successfully interact with code interpreter using Responses API, however, when it produces output files, I am unable to retrieve them.

I have tried several different endpoints (example logs below), as well as both the AzureAsyncOpenAI (version="2025-04-01-preview") and the AsyncOpenAI (version="preview") clients.

[TEXT_ANNOTATION] File generated: sample_scatter_chart.png (file_id=cfile_6894b18e4fc8819098a5c19afc56c288, container_id=cntr_6894b1877db081908f07930d4b29f74409df9536a75d20b3)

Attempting to download file cfile_6894b18e4fc8819098a5c19afc56c288 using standard files API

HTTP Request: GET {azure openai resource}/openai/files/cfile_6894b18e4fc8819098a5c19afc56c288/content?api-version=2025-04-01-preview "HTTP/1.1 404 Not Found"

Standard files API failed: Error code: 404 - {'error': {'code': 'notFound', 'message': 'The specified entity cannot be found.'}}, trying alternative methods

Trying endpoint: {azure openai resource}/openai/containers/cntr_6894b1877db081908f07930d4b29f74409df9536a75d20b3/files/cfile_6894b18e4fc8819098a5c19afc56c288/content?api-version=2025-04-01-preview

Trying endpoint: {azure openai resource}/openai/files/cfile_6894b18e4fc8819098a5c19afc56c288/content?api-version=2025-04-01-preview

Trying endpoint: {azure openai resource}/openai/responses/resp_6894b184f984819da23cb2151c221bb0031f8d7e3f3a3258/files/cfile_6894b18e4fc8819098a5c19afc56c288/content?api-version=2025-04-01-preview
Azure OpenAI in Foundry Models

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.