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!