Skip to content

Management API: Models and deployments

This page describes the endpoints for imported models, flavors, engines, deployments, and usage, corresponding to the Import models and Deployments tabs of the web app. The Basics explain what the terms and statuses mean; base URL, authentication, and error format are described in the API overview.

The examples use the variable XCLOUD_AI_CONTROL_TOKEN for your key for deployments and the following base URL:

export XCLOUD_AI_CONTROL_TOKEN='<key for deployments>'
export XCLOUD_AI_API='https://control.ai.xcloud.eu/v1'

Models

Method Path Description
POST /models/import Import a model
GET /models?scope=own All imported models of the project
GET /models/own/{name} Show an imported model
DELETE /models/own/{name} Delete an imported model

Without scope=own, GET /models doesn't return your imported models; therefore always specify the parameter.

Model attributes

Attribute Description
name Name of the model
ref Reference for deployments, xcloud://models/<name>
phase Verifying, Importing, Ready, or Failed
message Reason for Failed, otherwise notes on progress
origin Source from which the model was imported
requestedRevision Requested revision
revision Pinned revision: commit for Hugging Face, digest for S3
format Format of the model files, safetensors
sizeBytes Size in bytes
fileCount Number of files
importedBytes Bytes copied so far during the import
flavors Flavors whose GPU memory the model fits into
warnings Notes that don't prevent the import
createdAt Time of the request
readyAt Time at which the model was ready
deletedAt Time of deletion; the model storage ends here

Which phase corresponds to which status in the web app is described in the Basics.

Import a model

POST /models/import checks the source (Verifying), copies the files (Importing), and ends with Ready or Failed. The response comes immediately with 202 and the model in the Verifying phase.

Field Required Description
name yes Model name (see Names)
source yes hf://<Org>/<Repository> or s3://<Host>/<Bucket>/<path>
revision no Branch, tag, or commit; default main
accessToken no Token for private or gated repositories
accessKeyId no Access Key for private S3 buckets
secretAccessKey no Secret Key for private S3 buckets

Access token, Access Key, and Secret Key are stored only for this import and deleted afterwards. A second import of the same revision under the same name changes nothing.

From Hugging Face:

curl -X POST "$XCLOUD_AI_API/models/import" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "qwen3-8-27b",
        "source": "hf://Qwen/Qwen3.8-27B",
        "revision": "main"
      }'

From a bucket in xCloud Storage: you find the server address of your storage flavor, e.g. storage-3s.de.xcloud.eu, and a key pair with read permission in xCloud Storage in the Key management tab (see Access keys). The example imports the folder qwen-ft-v2/ from the bucket models.

curl -X POST "$XCLOUD_AI_API/models/import" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "qwen-ft-v2",
        "source": "s3://storage-3s.de.xcloud.eu/models/qwen-ft-v2/",
        "accessKeyId": "<Access Key>",
        "secretAccessKey": "<Secret Key>"
      }'

With ?dryRun=true, the API only checks the request itself without creating anything; the source is checked only in the Verifying phase.

Track the import

GET /models/own/{name} returns the model. Query it at intervals until phase has the value Ready or Failed:

curl "$XCLOUD_AI_API/models/own/qwen3-8-27b" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN"
{
  "name": "qwen3-8-27b",
  "ref": "xcloud://models/qwen3-8-27b",
  "phase": "Ready",
  "origin": "hf://Qwen/Qwen3.8-27B",
  "requestedRevision": "main",
  "revision": "<commit>",
  "format": "safetensors",
  "sizeBytes": 54000000000,
  "fileCount": 15,
  "flavors": ["<flavor>", "<flavor>"],
  "createdAt": "2026-11-12T09:14:03Z",
  "readyAt": "2026-11-12T09:41:27Z"
}

Delete a model

DELETE /models/own/{name} deletes the model and ends its model storage. As long as a deployment uses the model, the API responds with 409; end the deployment first.

curl -X DELETE "$XCLOUD_AI_API/models/own/qwen3-8-27b" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN"

Flavors

GET /compute/flavors lists the flavors you can order for your project.

Attribute Description
name Name, for the flavor field of a deployment
gpuClass Card type, e.g. b300
gpus Size in cards, e.g. "0.125" (eighth of a card) or "1"
memoryGiB GPU memory in GiB
computeShare Compute share per card in percent
eurPerHour List price per hour in euros
description Description
available true if the flavor is currently free

gpus is also the unit of your GPU limit: a deployment with "0.5" takes up half a card of it.

Engines

GET /engines returns the provided engines vLLM and SGLang with their default values and the requirements for a custom image. From these values, you build the serving block of a deployment.

items[] Description
name vllm or sglang
image Image of the engine
digest Digest to which the image is pinned
port Port of the OpenAI-compatible interface
command Start command
defaultArgs Default arguments (see below)
modelMountPath Directory in which the model is available
healthPath Path of the readiness check
formats Model formats the engine loads
notes Notes on the engine
custom Description
defaultPort Port a custom image must offer
modelMountPath Directory in which the model is available
defaultHealthPath Default path of the readiness check
registries Allowed registries; currently only public ones
notes Notes for custom images

In defaultArgs, the platform inserts $(XCLOUD_MODEL_PATH) (directory of the model), $(XCLOUD_SERVED_MODEL) (name of the deployment), and $(XCLOUD_PORT) (port) at start. Keep the placeholders unchanged. A custom image receives the same values as the environment variables XCLOUD_MODEL_PATH, XCLOUD_SERVED_MODEL, and XCLOUD_PORT; the model directory is read-only.

Deployments

Method Path Description
GET /model-placements List all
GET /model-placements/{name} Show one
POST /model-placements Start one
PATCH /model-placements/{name} Change values
POST /model-placements/{name}/restart Restart
GET /model-placements/{name}/logs Read the start log
DELETE /model-placements/{name} End one

Deployment attributes

Attribute Description
name Name; the model answers requests under it
model The imported model as xcloud://models/<name>
flavor Name of the flavor
serving The engine (see below)
owner Service account that started the deployment
createdAt Time of the start
status.phase Phase (see Basics)
status.message Reason for Failed and further notes
status.warnings Notes that don't prevent operation

owner contains the name of the service account as the API keeps it; it may differ from the name in the web app.

The serving block describes the engine:

Field Description
image Image; a tag is resolved to a digest on creation
command Start command; replaces the image's entrypoint
args Arguments, passed unchanged
endpoint.port Port of the OpenAI-compatible interface
health.path Readiness check; default /health
health.timeoutSeconds Maximum duration of a check in s; SGLang: 5
modelMountPath Directory of the model; default /mnt/models

Which phase corresponds to which status in the web app is described in the Basics.

Start a deployment

For a provided engine, you take image, command, port, and defaultArgs from GET /engines and append your start parameters to defaultArgs. This way, the web app recognizes the engine and shows your start parameters separately.

The example starts Qwen/Qwen3.8-27B with vLLM on b300-96g. command, port, and the first five entries of args come from the vllm entry in GET /engines; the rest are the start parameters. The Qwen3.8-27B example shows how to assemble this automatically from GET /engines.

curl -X POST "$XCLOUD_AI_API/model-placements" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "qwen3-8-27b",
        "model": "xcloud://models/qwen3-8-27b",
        "flavor": "b300-96g",
        "serving": {
          "image": "<image of vllm from GET /engines>",
          "command": ["vllm", "serve"],
          "args": [
            "$(XCLOUD_MODEL_PATH)", "--served-model-name", "$(XCLOUD_SERVED_MODEL)",
            "--port", "$(XCLOUD_PORT)",
            "--max-model-len", "262144", "--kv-cache-dtype", "fp8",
            "--reasoning-parser", "qwen3", "--max-num-seqs", "64"
          ],
          "endpoint": {"port": 8000}
        }
      }'

The Qwen3.8-27B example explains the start parameters for this model.

For a custom image, you only specify image (with digest), optionally args, and the port.

{
  "name": "custom-image",
  "model": "xcloud://models/qwen3-8-27b",
  "flavor": "<flavor>",
  "serving": {
    "image": "registry.example.com/vllm-custom@sha256:<digest>",
    "endpoint": {"port": 8000}
  }
}

The response comes with 201 and the deployment. It answers requests as soon as status.phase has the value Ready.

With ?dryRun=true, the API checks the request and also whether a card is free and the GPU limit is sufficient, without creating anything.

A deployment is rejected with:

  • 409 and NoCapacity if no card is currently free for the flavor
  • 409 and quota_exceeded if it would exceed your GPU limit; details names the limit, current usage, and the request
  • 409 and already_exists if the name is taken
  • 400 if the name starts with batch- or ends with -batch
  • 422 if an image's tag can't be resolved

In each of these cases, nothing is created.

Change values

PATCH /model-placements/{name} corresponds to Start with new values in the web app. Fields you omit stay unchanged.

  • flavor: The deployment books the new flavor and restarts on it; the old and the new flavor never run at the same time. If the new flavor is rejected, the deployment keeps running unchanged.
  • serving with image, command, or args: The engine restarts with the new values. A list you specify completely replaces the previous one.

Name, model, and accesses are retained.

curl -X PATCH "$XCLOUD_AI_API/model-placements/qwen3-8-27b" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"flavor": "<flavor>"}'

Restart

POST /model-placements/{name}/restart restarts the engine with the same values on the same card.

Read the start log

GET /model-placements/{name}/logs returns the engine's output as text. With tail, you limit the output to the last lines; with follow=true, you follow it continuously. If the engine never started, the API responds with 409 and states the reason. If the engine restarts repeatedly, previous=true returns the log of the last aborted run and thus usually the cause of the error. After a deployment has ended, the API returns the last 50 lines.

curl "$XCLOUD_AI_API/model-placements/qwen3-8-27b/logs?tail=50" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN"

End a deployment

DELETE /model-placements/{name} ends the deployment and frees the card immediately. The runtime up to this moment is billed. The imported model is retained.

curl -X DELETE "$XCLOUD_AI_API/model-placements/qwen3-8-27b" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN"

Usage

GET /usage returns how long your deployments have occupied GPUs. The values are quantities, not amounts; the billing in the web app is authoritative for the invoice.

Parameter Description
from First day, YYYY-MM-DD; default: start of the month
to Last day, YYYY-MM-DD
gpuGroupBy Breakdown: day (per day), order (per deployment)
curl "$XCLOUD_AI_API/usage?from=2026-11-01&to=2026-11-11&gpuGroupBy=order" \
  -H "Authorization: Bearer $XCLOUD_AI_CONTROL_TOKEN"

The GPU time is in the gpuHours field, with one row per flavor and chosen breakdown:

Attribute Description
through Last included day; completed days (UTC) are evaluated
totals.hours Sum of GPU hours
rows[].flavor Flavor
rows[].order Name of the deployment (with gpuGroupBy=order)
rows[].day Day (with gpuGroupBy=day)
rows[].gpus Size of the flavor in cards
rows[].hours GPU hours
rows[].open true if the deployment was still running at the end of the last day
{
  "from": "2026-11-01",
  "to": "2026-11-11",
  "gpuHours": {
    "through": "2026-11-11",
    "totals": {"hours": 228.5},
    "rows": [
      {"flavor": "<flavor>", "order": "qwen3-8-27b", "gpus": "0.5", "hours": 228.5, "open": true}
    ]
  }
}