Share via

openAI bad request error

Anonymous
2025-05-20T05:31:31.6166667+00:00

openai.BadRequestError: Error code: 400 - {'error': {'code': 'invalidPayload', 'message': 'The specified base model does not support fine-tuning.'}}

i have selected gpt-4o-mini which can be fine tuned why am i getting

Azure OpenAI in Foundry Models
0 comments No comments

Answer accepted by question author

Sina Salam 30,166 Reputation points Volunteer Moderator
2025-05-20T19:42:43.01+00:00

Hello Menon, Kousthub R,

Welcome to the Microsoft Q&A and thank you for posting your questions here.

I understand you're encountering a 400 - invalidPayload error while trying to fine-tune the gpt-4o-mini model using OpenAI's API.

This issue typically is arising not because the model is unsupported, but due to using an incorrect model ID.

Below are supported models for finetuning in Azure OpenAI.

Model ID Standard Training Regions Global Training (Preview) Max request (tokens) Training Data (up to) Modality
-
gpt-35-turbo (1106) East US2 North Central US Sweden Central Switzerland West - Input: 16,385 Output: 4,096 Sep 2021 Text to Text
gpt-35-turbo (0125) East US2 North Central US Sweden Central Switzerland West - 16,385 Sep 2021 Text to Text
gpt-4o-mini (2024-07-18) North Central US Sweden Central - Input: 128,000 Output: 16,384 Training example context length: 65,536 Oct 2023 Text to Text
gpt-4o (2024-08-06) East US2 North Central US Sweden Central - Input: 128,000 Output: 16,384 Training example context length: 65,536 Oct 2023 Text & Vision to Text
gpt-4.1 (2025-04-14) North Central US Sweden Central Input: 128,000 Output: 16,384 Training example context length: 65,536 May 2024 Text & Vision to Text
gpt-4.1-mini (2025-04-14) North Central US Sweden Central Input: 128,000 Output: 16,384 Training example context length: 65,536 May 2024 Text to Text
gpt-4.1-nano (2025-04-14) North Central US Sweden Central Input: 128,000 Output: 16,384 Training example context length: 32,768 May 2024 Text to Text
o4-mini (2025-04-16) East US2 Sweden Central - Input: 128,000 Output: 16,384 Training example context length: 65,536 May 2024 Text to Te

Moreover, fine-tuning is only available to users on a paid plan, and your training file must be uploaded in .jsonl format via the Files API. If any of these conditions are unmet, the API will reject your request with the error you're seeing.

For full fine-tuning documentation visit Azure OpenAI Fine-tuning Guide as listed below:

https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#fine-tuning-models

I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

Was this answer helpful?


0 additional answers

Sort by: Most 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.