Overview
Images endpointsAvailable Operations
- Generate - Generate an image
- ListModels - List image generation models
- ListModelEndpoints - List endpoints for an image model
Generate
Generates an image from a text prompt via the image generation routerExample Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. |
request | components.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, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.PaymentRequiredResponseError | 402 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.TooManyRequestsResponseError | 429 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.BadGatewayResponseError | 502 | application/json |
| sdkerrors.EdgeNetworkTimeoutResponseError | 524 | application/json |
| sdkerrors.ProviderOverloadedResponseError | 529 | application/json |
| sdkerrors.APIError | 4XX, 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
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx | context.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, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 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
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
author | string | :heavy_check_mark: | Model author/organization | bytedance-seed |
slug | string | :heavy_check_mark: | Model slug | seedream-4.5 |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.ImageModelEndpointsResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |