Skip to content

Instances

These are the endpoints the console calls when you launch, watch and destroy an instance. They accept only a browser session, not an API key. To script instances, use Radeon Cloud CLI.

Paths are relative to your site’s console address, for example https://developer.amd.com.cn/radeon. Each account can have one instance at a time, so none of these endpoints take an instance ID.

TaskNotebookModel service
LaunchPOST /api/notebook/requestPOST /api/inference or POST /api/templates/{id}/launch
Check statusGET /api/notebook/statusGET /api/inference/current
Read logsGET /api/notebook/logsGET /api/inference/current/logs
DestroyDELETE /api/notebook/currentDELETE /api/inference/current

A launch names a resource pool and a size. Both come from GET /api/me/resource-labels, which lists what your account may use:

  • entries with "category": "resource-pool" are pools; send the id as pod_type
  • entries with "category": "resource-template" are sizes; send the id as resource_template

For example, pod_type: "one-click" with resource_template: "resource-16c55g1u" is 1 GPU, 16 cores and 55 GB of memory. Accounts that have pools and sizes assigned must send both fields and must not send gpu_count.

POST /api/notebook/request Session
FieldTypeDescription
pod_typestringRequiredResource pool ID.
resource_templatestringRequiredSize ID.
imagestringOptionalAn image from the catalog. Defaults to the platform default, AMD OneClick Base.
instance_typestringOptionalMust be jupyter, the default.
use_pvcbooleanOptionaltrue mounts your persistent /workspace. Default false, a temporary workspace.
pvc_sizestringOptional25GB or 100GB, with use_pvc: true. 100 GB is offered only to some accounts.
model_mountstringOptionalA model to mount read-only. GET /api/models/mountable lists the IDs, each with the mount_path it appears at, usually /models.
ssh_enabledbooleanOptionalThe console always sends true. Requires an SSH key in Settings.
{
"pod_type": "one-click",
"resource_template": "resource-16c55g1u",
"instance_type": "jupyter",
"use_pvc": true,
"pvc_size": "25GB",
"ssh_enabled": true
}

The call returns as soon as the launch is accepted; it doesn’t wait for the instance. Poll status until ready is true.

The launch is refused when:

  • you already have an instance (400, Each user can only have one active instance), or the previous one is still being deleted (409)
  • your credits don’t cover one hour on the chosen size (400, Insufficient credits). Only the Global site checks this up front. On the China site, the instance is deleted once an hour can’t be charged.
  • instance_type isn’t jupyter (400, unsupported_deploy_type)
  • the pool or size isn’t assigned to your account (403, resource_selection_not_assigned)

To serve your own model (Deploy type: Model API), send the model name and the vLLM command:

POST /api/inference Session
FieldTypeDescription
api_modelstringRequiredThe name clients send as model. Use the same value as --served-model-name in the command.
start_commandstringRequiredA vllm serve command listening on port 8000.
model_sourcestringOptionalhuggingface (default) or modelscope.
pod_type, resource_templatestringRequiredAs for a notebook.
{
"api_model": "MiniCPM5-1B",
"model_source": "modelscope",
"start_command": "vllm serve OpenBMB/MiniCPM5-1B --host 0.0.0.0 --port 8000 --served-model-name MiniCPM5-1B",
"pod_type": "one-click",
"resource_template": "resource-16c55g1u"
}

Unknown fields are rejected. To launch one of the ready-made model templates instead, list them with GET /api/inference/templates and call POST /api/templates/{id}/launch with an empty body. See Templates.

GET /api/notebook/status Session

For a model service, call GET /api/inference/current. It returns the same fields plus runtime and credit details.

{
"status": "ready",
"ready": true,
"message": "Your workspace is ready",
"instance_id": "<instance-id>",
"instance_type": "jupyter",
"url": "https://developer.amd.com.cn/radeon/instances/<instance-id>/",
"ssh_host": "<ssh-host>",
"ssh_port": 32014,
"ssh_username": "root",
"ssh_command": "ssh root@<ssh-host> -p 32014",
"api_base_url": null,
"api_key": null,
"api_model": null
}
FieldDescription
readytrue only when the instance is usable. Wait on this, not on status.
status, messageProgress or failure, for display. failed means the launch won’t recover.
phase, reason, detail, error_codeLower-level scheduling state. Useful when a launch is stuck.
instance_idAppears in the instance’s URLs. It can stay the same across launches, but read it from here rather than storing it.
urlOpens JupyterLab in a signed-in browser.
ssh_host, ssh_port, ssh_username, ssh_commandFilled in once the container is running.
persistent_available, storage_noticeWhether the persistent /workspace was mounted, and why not if it wasn’t.
api_base_url, api_key, api_modelFilled in for a ready model service. See Model service endpoints.

Poll every few seconds. A launch is usually ready within a minute, but a large image or a model download can take several minutes.

GET /api/notebook/logs Session

Returns scheduling events and container output for the current instance. This is what View logs shows in the console. For a model service, call GET /api/inference/current/logs.

DELETE /api/notebook/current Session

For a model service, call DELETE /api/inference/current.

{
"success": true,
"message": "Instance <instance-id> destroyed",
"destroyed_count": 1
}

If there’s nothing to destroy, the response has success: false and "No active instance found". This isn’t an error, so it’s safe to call twice.

Files in a temporary workspace are deleted with the instance. A persistent /workspace is kept. See Keep your data.