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

edits(client, input)

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.

generations(client, input)

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.

models(client)

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