Add Variant From Image
POST/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
- application/json
 
Body
required
- MOD1
 - MOD1
 
base_name
object
required
anyOf
string
config_name
object
required
anyOf
string
Responses
- 200
 - 422
 
Successful Response
- application/json
 
- Schema
 
Schema
any
Validation Error
- application/json
 
- Schema
 - Example (from schema)
 
Schema
Array [
Array [
- MOD1
 - MOD2
 ]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}