Skip to main content

Add Variant From Image

POST 

https://cloud.agenta.ai/api/apps/:app_id/variant/from-image

Add a new variant to an app based on a Docker image.

Args: app_id (str): The ID of the app to add the variant to. payload (AddVariantFromImagePayload): The payload containing information about the variant to add. stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).

Raises: HTTPException: If the feature flag is set to "demo" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app.

Returns: dict: The newly added variant.

Request

Path Parameters

    app_id App Idrequired

Body

required

    variant_name Variant Name (string)required
    docker_id Docker Id (string)required
    tags Tags (string)required

    base_name

    object

    required

    anyOf

    string

    config_name

    object

    required

    anyOf

    string

Responses

Successful Response

Schema

    any

curl -L 'https://cloud.agenta.ai/api/apps/:app_id/variant/from-image' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"variant_name": "string",
"docker_id": "string",
"tags": "string",
"base_name": "string",
"config_name": "string"
}'
Request Collapse all
Base URL
https://cloud.agenta.ai/api
Auth
Parameters
— pathrequired
Body required
{
  "variant_name": "string",
  "docker_id": "string",
  "tags": "string",
  "base_name": "string",
  "config_name": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!