Skip to main content

Agent Deployments

Deploy your agent as a real, long-lived container on AINative's managed cloud. Your image is pulled and started, gets a public HTTPS endpoint, and scales to the replica count for your plan. Includes health monitoring and integrated ZeroDB storage.

Provide a valid, publicly-pullable image_uri. A deployment starts in provisioning and is promoted to running automatically once the container's /health endpoint responds — health is polled every 60 seconds.

Base path: /api/v1/cloud/deployments

POST /

Deploy an agent container. Requires a registered agent and a container image URI.

import requests

response = requests.post(
"https://api.ainative.studio/api/v1/cloud/deployments",
headers=HEADERS,
json={
"agent_registration_id": "550e8400-e29b-41d4-a716-446655440000",
"image_uri": "ghcr.io/my-org/my-agent:latest",
"resource_plan": "standard",
"runtime_config": {
"env": {
"LOG_LEVEL": "info",
"ZERODB_PROJECT": "my-project",
}
},
},
)

deployment = response.json()
print(f"Deployed: {deployment['endpoint_url']}")

Response (201):

{
"id": "dep-uuid",
"agent_registration_id": "550e8400-...",
"namespace": "agents-user-123",
"endpoint_url": "https://agents.ainative.studio/dep-uuid",
"image_uri": "ghcr.io/my-org/my-agent:latest",
"resource_plan": "standard",
"status": "provisioning",
"min_instances": 1,
"max_instances": 3,
"auto_scale_enabled": true,
"health_status": "unknown"
}

GET /

List your agent deployments.

curl "https://api.ainative.studio/api/v1/cloud/deployments?status=running" \
-H "Authorization: Bearer $TOKEN"

GET /{deployment_id}

Get deployment details including status, endpoint URL, and scaling configuration.

curl https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid \
-H "Authorization: Bearer $TOKEN"

POST /{deployment_id}/scale

Scale deployment replicas.

requests.post(
"https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid/scale",
headers=HEADERS,
json={
"min_instances": 2,
"max_instances": 10,
},
)

Constraints: min_instances 0–10, max_instances 1–50.

DELETE /{deployment_id}

Teardown and terminate a deployment.

curl -X DELETE https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid \
-H "Authorization: Bearer $TOKEN"

GET /{deployment_id}/logs

Retrieve recent logs from a running agent.

curl "https://api.ainative.studio/api/v1/cloud/deployments/dep-uuid/logs?lines=100" \
-H "Authorization: Bearer $TOKEN"
ParameterTypeDefaultDescription
linesint50Number of log lines to return
sincedatetimeReturn logs after this timestamp

Resource Plans

PlanvCPUMemoryGPUScalingUse Case
basic0.5512 MB1 instanceDevelopment, testing
standard11 GB1–10Production workloads
performance22 GB1–20High-throughput agents
gpu24 GBT41–5ML inference agents

Deployment Lifecycle

provisioning ──(/health OK)──▶ running ⇄ scaling
│ │
│ (image pull / start fails) │ (stop / teardown)
▼ ▼
failed stopped

A deployment stays in provisioning until its container answers /health; the health poller (every 60s) then promotes it to running. If the image can't be pulled or the container never becomes healthy, it remains unhealthy — check GET /\{deployment_id\}/logs.