Class JobResult
- Namespace
- CivitaiSharp.Sdk.Models.Results
- Assembly
- CivitaiSharp.Sdk.dll
Represents the result payload of a job. This type does NOT contain an ErrorMessage property. To check for failures, inspect LastEvent and check if Type is Failed.
[JsonConverter(typeof(JobResultConverter))]
public sealed record JobResult : IEquatable<JobResult>
- Inheritance
-
JobResult
- Implements
- Inherited Members
Remarks
The Civitai job API can return different shapes for result depending on job type.
This type preserves the raw JSON while exposing commonly used blob fields for image jobs.
Constructors
JobResult(JsonElement)
Represents the result payload of a job. This type does NOT contain an ErrorMessage property. To check for failures, inspect LastEvent and check if Type is Failed.
public JobResult(JsonElement Raw)
Parameters
RawJsonElementThe raw JSON value returned by the API for the
resultproperty.
Remarks
The Civitai job API can return different shapes for result depending on job type.
This type preserves the raw JSON while exposing commonly used blob fields for image jobs.
Properties
Available
Gets whether the result is available for download. Defaults to false when the API does not provide the field.
[JsonIgnore]
public bool Available { get; }
Property Value
BlobKey
Gets the blob key for an image result, if present.
[JsonIgnore]
public string? BlobKey { get; }
Property Value
BlobUrl
Gets the temporary URL for downloading the generated image, if present.
[JsonIgnore]
public string? BlobUrl { get; }
Property Value
BlobUrlExpirationDate
Gets the expiration date for the blob URL, if present.
[JsonIgnore]
public DateTime? BlobUrlExpirationDate { get; }
Property Value
Raw
The raw JSON value returned by the API for the result property.
public JsonElement Raw { get; init; }