# Inference Event

POST

Sent when a generation finishes, fails or is cancelled.

## Authorizations

* **[bearerAuth](/docs/v1/rest-api#bearerauth)**
* **[oauth2](/docs/v1/rest-api#oauth2)**

## Request Bodyrequired

_InferenceWebhookEvent_

Delivered when an inference run reaches a terminal state.

object

**id**

required

_Id_

Unique event id, repeated in the webhook-id header.

string

**type**

required

_WebhookEventType_

Inference.completed, inference.failed or inference.cancelled.

string

Allowed values: inference.completed inference.failed inference.cancelled training.succeeded training.failed scoring\_run.completed scoring\_run.failed workflow\_run.succeeded workflow\_run.failed workflow\_run.cancelled

**created\_at**

required

_Created At_

When the event was raised (RFC 3339).

string

**data**

required

_GetInferenceRunV2Output_

Identical to the body of GET on the inference run.

object

**inference\_id**

required

_Inference Id_

Unique identifier for this inference run.

string format: uuid

**status**

required

_InferenceStatus_

Current status: in\_progress, complete, failed, cancelled, or deleted.

string

Allowed values: in\_progress complete failed cancelled deleted

**poll\_interval\_seconds**

_Poll Interval Seconds_

Suggested polling interval in seconds. Present while IN\_PROGRESS.

integer

nullable

**completed\_at**

_Completed At_

Completion timestamp. Present only on COMPLETE.

string format: date-time

nullable

**outputs**

_Outputs_

Generated assets. Present only on COMPLETE.

Array<object>

nullable

_ForgeRunAsset_object

**file\_id**

required

_File Id_

File ID for the generated asset.

string format: uuid

**url**

required

_Url_

Download URL for the asset.

string

**content\_type**

required

_Content Type_

MIME type, e.g. image/png or video/mp4.

string

**preview\_url**

_Preview Url_

Thumbnail/preview URL.

string

nullable

**width**

_Width_

Width in pixels.

integer

nullable

**height**

_Height_

Height in pixels.

integer

nullable

**duration\_seconds**

_Duration Seconds_

Duration for video/audio assets.

number

nullable

**file\_size\_bytes**

_File Size Bytes_

File size in bytes.

integer

nullable

**metadata**

Any of:

**FileMetadataView**

_FileMetadataView_

What an engine needs beyond the image to build a resource from a file. Each kind is null when absent.

object

**tile**

Any of:

**null**

_TileMetadataView_

Where a game tile’s sprite sits on its grid, in the sprite’s own pixels from its top-left corner.

object

**shape**

required

_TileShape_

The outline of one grid cell seen from straight above.

string

Allowed values: SQUARE HEXAGON

**orientation**

required

_TileOrientation_

How the cell is turned to the camera: DIAMOND or ALIGNED for a square, POINTY\_TOP or FLAT\_TOP for a hexagon.

string

Allowed values: DIAMOND ALIGNED POINTY\_TOP FLAT\_TOP

**elevation**

required

_Elevation_

Camera tilt in degrees above the ground plane; 90 is straight down.

number

**facing**

required

_Facing_

Quarter turn of the camera around the tile, in degrees clockwise seen from above: 0, 90, 180, or 270\. A hexagon is only drawn facing 0.

integer

**footprint\_width**

required

_Footprint Width_

Cells the footprint covers across (the base’s right-hand edge) at facing 0.

integer

**footprint\_depth**

required

_Footprint Depth_

Cells the footprint covers deep (the base’s left-hand edge) at facing 0.

integer

**height**

required

_Height_

Wall height in cell sides: 0 is a flat ground tile, 1 a cube on a square.

number

**tile\_width**

required

_Tile Width_

Width in pixels of one cell’s base outline in the sprite.

integer

**tile\_height**

required

_Tile Height_

Height in pixels of one cell’s base outline in the sprite.

integer

**anchor**

required

_TilePointView_

The point the tile is placed by: the bottom centre of the cell it stands on (the front cell of a footprint wider than one).

object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**cell\_center**

required

_TilePointView_

The centre of the anchor’s cell. Godot and Unity pin a tile here rather than at the anchor.

object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**base\_outline**

required

_Base Outline_

The footprint’s whole base outline, clockwise on screen from the anchor’s vertex or edge.

Array<object>

_TilePointView_object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**subject\_id**

_Subject Id_

What the tile shows. Every facing of one subject shares it, so a tileset can group them.

string format: uuid

nullable

**TileMetadataView**

null

**nine\_slice**

Any of:

**null**

_NineSliceMetadataView_

The insets a 9-slice draws a UI element by, in the image’s own pixels in from each edge.

The corners are drawn at their own size, the edges stretch along their length, and the centre stretches both ways.

object

**left**

required

_Left_

Pixels in from the left edge.

integer

**top**

required

_Top_

Pixels in from the top edge.

integer

**right**

required

_Right_

Pixels in from the right edge.

integer

**bottom**

required

_Bottom_

Pixels in from the bottom edge.

integer

**source**

required

_NineSliceSource_

DETECTED when measured off the pixels, USER when a person set the insets.

string

Allowed values: DETECTED USER

**NineSliceMetadataView**

null

**sprite\_sheet**

Any of:

**null**

_SpriteSheetMetadataView_

The frame grid a sprite sheet was packed on, in the sheet’s own pixels from its top-left corner.

Cells start `margin` pixels in from the sheet’s edges with `spacing` pixels between them.

object

**columns**

required

_Columns_

Cells across.

integer

**rows**

required

_Rows_

Cells down.

integer

**cell\_width**

required

_Cell Width_

Width of one cell in pixels.

integer

**cell\_height**

required

_Cell Height_

Height of one cell in pixels.

integer

**margin**

required

_Margin_

Pixels between the sheet’s edges and the outer cells.

integer

**spacing**

required

_Spacing_

Pixels between neighbouring cells.

integer

**frames**

required

_Frames_

The frames, in play order: left to right, then top to bottom, unless the list orders them otherwise.

Array<object>

_SpriteSheetFrameView_

One frame’s rect on the sheet, in the sheet’s own pixels from its top-left corner.

object

**index**

required

_Index_

The frame’s cell in reading order over the whole grid (left to right, then top to bottom). Cells that hold no frame are left out, so indexes can skip.

integer

**x**

required

_X_

The frame’s left edge on the sheet, in pixels.

integer

**y**

required

_Y_

The frame’s top edge on the sheet, in pixels.

integer

**w**

required

_W_

The frame’s width in pixels.

integer

**h**

required

_H_

The frame’s height in pixels.

integer

**anchor**

Any of:

**SpriteSheetMetadataView**

_TilePointView_object

**x**

required

_X_

Pixels right of the sprite’s left edge.

number

**y**

required

_Y_

Pixels down from the sprite’s top edge.

number

**null**

null

**animations**

required

_Animations_

Named animations over the frames. When empty, play the sheet as one animation named `default` over every frame in `frames` order, at 12 fps, looping.

Array<object>

_SpriteSheetAnimationView_object

**name**

required

_Name_

The animation’s name.

string

**frames**

required

_Frames_

Frame indexes (`frames[].index`), in play order.

Array<integer>

**fps**

required

_Fps_

Frames per second.

number

**loop**

required

_Loop_

Whether the animation restarts after its last frame.

boolean

**TilePointView**

null

**null**

null

**actual\_price\_creative\_units**

_Actual Price Creative Units_

Actual Creative Units charged. Present only on COMPLETE.

number

nullable

**error**

_Error_

Error message. Present only on FAILED.

string

nullable

**error\_code**

_Error Code_

Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit), `BALANCE_UNAVAILABLE` (the balance could not be verified, retry later) and `USAGE_LIMIT_EXCEEDED` (the member is past their usage limit: ask a workspace admin for more, or wait for it to reset).

string

nullable

**base\_model\_id**

_Base Model Id_

Base model the run used, resolved or auto-picked.

string

nullable

**reference\_set\_contributions**

_Reference Set Contributions_

Per-set summary of what each reference set contributed.

Array<object>

default: 

_ForgeReferenceSetContribution_object

**set\_id**

_Set Id_

Reference Set ID this contribution belongs to, if any.

string format: uuid

nullable

**lora\_applied**

_Lora Applied_

True when a LoRA finetune was applied for this set.

boolean

**animation\_applied**

_Animation Applied_

True when an animation (Meshy rigging action) finetune was applied for this set.

boolean

**voice\_applied**

_Voice Applied_

True when a voice (ElevenLabs) finetune was applied for this set.

boolean

**mapped\_asset\_count**

_Mapped Asset Count_

Number of assets successfully mapped to guidance inputs.

integer

0

**palette\_applied**

_Palette Applied_

True when the set’s color palette was appended to the prompt.

boolean

**prompt\_fallback\_applied**

_Prompt Fallback Applied_

True when the set fell back to prompt-only representation.

boolean

**auto\_prompt\_applied**

_Auto Prompt Applied_

True when the set’s auto prompt addition was appended to the prompt. Informational: the text rides on top of whatever else the set contributed and is not a degradation.

boolean

**lora\_available\_but\_incompatible**

_Lora Available But Incompatible_

True when SBMC has a LoRA for this set on another base model but not the one used.

boolean

**skipped\_not\_applicable**

_Skipped Not Applicable_

True when the set isn’t applicable to the chosen model (its modality / applicable base models exclude it) so no LoRA or assets were applied.

boolean

**skipped\_irrelevant\_category**

_Skipped Irrelevant Category_

True when the set’s category means nothing for the chosen model’s modality (a camera move on an image model), so it was dropped entirely, prompt text included. Implies skipped\_not\_applicable.

boolean

**reference\_sets\_degraded**

_Reference Sets Degraded_

True when at least one attached reference set did not meaningfully contribute. The run still costs Creative Units.

boolean

**reference\_sets\_warning**

_Reference Sets Warning_

Names each degraded reference set and why, or null when none is degraded.

string

nullable

**webhook**

Any of:

**WebhookStatusView**

_WebhookStatusView_

What a job’s `GET` reports about the callback attached to it.

The URL is echoed so a caller can tell which of its endpoints a run was aimed at; the rest is how the delivery went, which is the only place a failed delivery is visible.

object

**url**

required

_Url_

The callback URL this run was submitted with.

string

**status**

required

_WebhookDeliveryStatus_

Pending until a delivery settles, then delivered or failed.

string

Allowed values: pending delivered failed

**attempts**

required

_Attempts_

How many delivery attempts have been made.

integer

**last\_attempt\_at**

_Last Attempt At_

When the last attempt was made.

string format: date-time

nullable

**last\_response\_status**

_Last Response Status_

HTTP status the receiver returned on the last attempt, if it responded.

integer

nullable

**last\_error**

_Last Error_

Why the last attempt did not succeed. Null once delivered.

string

nullable

**null**

null

**metadata**

_Metadata_

Whatever you sent as webhook.metadata.

object

**_key_**

additional properties

string

## Responses

### 200

Successful Response

##### Examplegenerated

```json
example
```

### 422

Validation Error

_HTTPValidationError_object

**detail**

_Detail_

Array<object>

_ValidationError_object

**loc**

required

_Location_

Array

**msg**

required

_Message_

string

**type**

required

_Error Type_

string

**input**

_Input_

**ctx**

_Context_object

##### Examplegenerated

```json
{
  "detail": [
    {
      "loc": [
        "example"
      ],
      "msg": "example",
      "type": "example",
      "input": "example",
      "ctx": {}
    }
  ]
}
```
