ArchAstro. V1. Ai. Image
(archastro v0.2.0)
Copy Markdown
Image API resource.
Summary
Functions
Edit an image with a text prompt
Generate an image from a text prompt
List available image generation models
Functions
@spec edits( ArchAstro.Client.t(), ArchAstro.Types.Operations.PostApiV1AiImageEdits.Input.t() ) :: {:ok, ArchAstro.Types.AIImageResult.t()} | {:error, ArchAstro.Error.reason()}
Edit an image with a text prompt
Applies a text-guided edit to one or more source images and returns the
resulting image. Pass the source images as base64-encoded objects in the
images array alongside a prompt describing the desired modification.
The underlying provider is selected by the model parameter. Omit model
to use the platform default. Size, quality, style, and format options are
forwarded to the provider as-is; unsupported combinations for a given model
return a 422 error with the provider's error message.
This endpoint requires authentication. The request is billed against the workspace associated with the authenticated user.
The resulting edited image, including base64 data or a URL depending on the model.
@spec generations( ArchAstro.Client.t(), ArchAstro.Types.Operations.PostApiV1AiImageGenerations.Input.t() ) :: {:ok, ArchAstro.Types.AIImageResult.t()} | {:error, ArchAstro.Error.reason()}
Generate an image from a text prompt
Generates one or more images from a natural-language prompt using the
specified AI image model. The response contains the first generated image;
use n to request additional images (where supported by the model).
The underlying provider is selected by the model parameter. Omit model
to use the platform default. Size, quality, style, and format options are
forwarded to the provider as-is; unsupported combinations for a given model
return a 422 error with the provider's error message.
This endpoint requires authentication. The request is billed against the workspace associated with the authenticated user.
The generated image, including base64 data or a URL depending on the model.
@spec models(ArchAstro.Client.t()) :: {:ok, ArchAstro.Types.Operations.GetApiV1AiImageModels.Response.t()} | {:error, ArchAstro.Error.reason()}
List available image generation models
Returns the list of image generation models available on the platform.
Exactly one entry in the list carries default: true, indicating the model
used when no model parameter is supplied to the generation or editing
endpoints.
This endpoint requires authentication and reflects the models enabled for the authenticated user's workspace.
Successful response