OpenAI: create and monitor a fine-tuning job

domain: platform.openai.com/docs · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Prepare your training data as a JSONL file where each line is a JSON object with a 'messages' array following the chat format required by the target model.
  2. Upload the file using the Files API: client.files.create(file=open('train.jsonl', 'rb'), purpose='fine-tune') and record the returned file ID.
  3. Create the fine-tuning job: client.fine_tuning.jobs.create(training_file=FILE_ID, model='MODEL_NAME') using a supported base model name.
  4. Poll the job status with client.fine_tuning.jobs.retrieve(JOB_ID) or list events with client.fine_tuning.jobs.list_events(JOB_ID) until the status is 'succeeded'.
  5. Note the fine_tuned_model field in the completed job object; this is the model ID to use for inference.
  6. Test the fine-tuned model by calling the Chat Completions API with model=FINE_TUNED_MODEL_ID.

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans