Skip to main content

Overview

Images endpoints

Available Operations

Generate

Generates an image from a text prompt via the image generation router

Example Usage

Parameters

ParameterTypeRequiredDescription
ctxcontext.Context:heavy_check_mark:The context to use for the request.
requestcomponents.ImageGenerationRequest:heavy_check_mark:The request object to use for the request.
opts[]operations.Option:heavy_minus_sign:The options for this request.

Response

*operations.CreateImagesResponse, error

Errors

Error TypeStatus CodeContent Type
sdkerrors.BadRequestResponseError400application/json
sdkerrors.UnauthorizedResponseError401application/json
sdkerrors.PaymentRequiredResponseError402application/json
sdkerrors.ForbiddenResponseError403application/json
sdkerrors.NotFoundResponseError404application/json
sdkerrors.PayloadTooLargeResponseError413application/json
sdkerrors.TooManyRequestsResponseError429application/json
sdkerrors.InternalServerResponseError500application/json
sdkerrors.BadGatewayResponseError502application/json
sdkerrors.EdgeNetworkTimeoutResponseError524application/json
sdkerrors.ProviderOverloadedResponseError529application/json
sdkerrors.APIError4XX, 5XX*/*

ListModels

Lists every image generation model with its top-level supported-parameter superset and a URL to its full per-endpoint records.

Example Usage

Parameters

ParameterTypeRequiredDescription
ctxcontext.Context:heavy_check_mark:The context to use for the request.
opts[]operations.Option:heavy_minus_sign:The options for this request.

Response

*components.ImageModelsListResponse, error

Errors

Error TypeStatus CodeContent Type
sdkerrors.InternalServerResponseError500application/json
sdkerrors.APIError4XX, 5XX*/*

ListModelEndpoints

Returns the full per-endpoint records for an image model: each endpoint’s definitive supported parameters, pricing, and passthrough allowlist.

Example Usage

Parameters

ParameterTypeRequiredDescriptionExample
ctxcontext.Context:heavy_check_mark:The context to use for the request.
authorstring:heavy_check_mark:Model author/organizationbytedance-seed
slugstring:heavy_check_mark:Model slugseedream-4.5
opts[]operations.Option:heavy_minus_sign:The options for this request.

Response

*components.ImageModelEndpointsResponse, error

Errors

Error TypeStatus CodeContent Type
sdkerrors.NotFoundResponseError404application/json
sdkerrors.InternalServerResponseError500application/json
sdkerrors.APIError4XX, 5XX*/*