Add Variant From Image
POSThttps://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
- application/json
Body
required
variant_name Variant Name (string)required
docker_id Docker Id (string)required
tags Tags (string)required
base_name
object
required
config_name
object
required
Responses
- 200
- 422
Successful Response
- application/json
- Schema
Schema
any
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
detail
object[]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
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"
}'
ResponseClear