Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Openai Openai python Fine Tuning Job Failed Webhook

From Leeroopedia
Revision as of 13:38, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Openai_Openai_python_Fine_Tuning_Job_Failed_Webhook.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains API_Types, Python
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete type for representing a fine-tuning job failed webhook event provided by the openai-python SDK.

Description

FineTuningJobFailedWebhookEvent is a Pydantic model class that represents the webhook payload sent when a fine-tuning job has failed. It extends BaseModel and includes an event identifier, a Unix timestamp for when the failure occurred, a nested Data payload containing the fine-tuning job ID, a literal type field fixed to "fine_tuning.job.failed", and an optional object field fixed to "event".

Usage

Import this type when building a webhook handler that needs to process fine-tuning job failure events from the OpenAI API. Use it to deserialize incoming webhook payloads and trigger error-handling or retry logic for failed training jobs.

Code Reference

Source Location

Signature

class Data(BaseModel):
    """Event data payload."""
    id: str

class FineTuningJobFailedWebhookEvent(BaseModel):
    """Sent when a fine-tuning job has failed."""
    id: str
    created_at: int
    data: Data
    type: Literal["fine_tuning.job.failed"]
    object: Optional[Literal["event"]] = None

Import

from openai.types.webhooks import FineTuningJobFailedWebhookEvent

I/O Contract

Fields

Name Type Required Description
id str Yes The unique ID of the event.
created_at int Yes Unix timestamp (in seconds) of when the fine-tuning job failed.
data Data Yes Event data payload containing the fine-tuning job ID.
data.id str Yes The unique ID of the fine-tuning job.
type Literal["fine_tuning.job.failed"] Yes The type of the event. Always "fine_tuning.job.failed".
object Optional[Literal["event"]] No The object of the event. Always "event" when present.

Usage Examples

from openai.types.webhooks import FineTuningJobFailedWebhookEvent

# Parse a webhook payload
event = FineTuningJobFailedWebhookEvent.model_validate(payload)
print(f"Fine-tuning job {event.data.id} failed at {event.created_at}")
print(f"Event type: {event.type}")  # "fine_tuning.job.failed"

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment