What is the default expiration time (TTL) for input_file in Azure OpenAI Batch API?

Hồ Văn Cón 10 Reputation points
2025-09-11T09:36:02.7666667+00:00

Hello Microsoft Support,

I am currently using the Azure OpenAI Batch API. When I create a batch job, I upload an input_file using the files.create method and then pass the input_file_id into batches.create.

My question is:

What is the default expiration time (TTL) for the uploaded input_file in Azure OpenAI?

Will it automatically expire after a certain period (e.g., 24h, 48h), or is it retained until I explicitly delete it?

If there is a retention policy, can it be configured, and where is this documented?

Thank you in advance for clarifying.

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
{count} votes

1 answer

Sort by: Most helpful
  1. SRILAKSHMI C 8,620 Reputation points Microsoft External Staff Moderator
    2025-09-11T10:05:19.37+00:00

    Hello Hồ Văn Cón,

    Welcome to Microsoft Q&A,

    Thank you for your question about the expiration time (TTL) of input_file when using the Azure OpenAI Batch API.

    By default, uploaded files do not automatically expire. If you don’t set an expiration, they will remain available until you explicitly delete them. This means there’s no short-term automatic expiration (e.g., 24 or 48 hours).

    To control retention, you can configure an expiration using the expires_after parameter when uploading the file with files.create. This parameter supports values between 14 and 30 days (1,209,600 to 2,592,000 seconds). Setting an expiration is also useful if you are managing large volumes of batch jobs, as it increases the file capacity per resource from the default 500 files up to 10,000.

    Currently, retention beyond 30 days isn’t supported natively, so if you need longer retention, you will need to re-upload files or manage them manually.

    For details and examples, please see the official docs Azure OpenAI Batch – How to Use.

    I Hope this helps. please Do let me know if you have any further queries.


    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thank you!


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.