Skip to content

Templates

Templates hold the configuration an instance launches from. See Create a template for what the fields mean in practice.

GET /api/profile/templates Session or API key

Returns your templates and the container images you can choose from.

{
"templates": [
{
"id": 87,
"title": "ROCm PyTorch dev",
"slug": "rocm-pytorch-dev",
"image": "rocm/pytorch:latest",
"instance_type": "jupyter",
"ssh_enabled": true,
"enabled": false,
"sort_order": 0
}
],
"images": [
{ "name": "ROCm PyTorch", "image": "rocm/pytorch:latest", "enabled": true }
]
}
POST /api/profile/templates Session or API key
ParameterTypeDescription
titlestringRequiredDisplay name.
imagestringRequiredContainer image, from the catalog.
instance_typestringOptionaljupyter, gradio, streamlit, comfyui, vllm, sglang, custom.
descriptionstringOptionalLonger description.
slugstringOptionalURL-friendly identifier.
categorystringOptionalGrouping label.
tagsarrayOptionalFree-form tags.
repo_urlstringOptionalGit repository cloned on start.
branchstringOptionalBranch to check out. Defaults to main.
notebook_pathstringOptionalNotebook to open on start.
start_commandstringOptionalCommand run at startup. Required for vllm and sglang.
app_portintegerOptionalPort the app serves on. Must be one the platform routes: 7860 Gradio, 8501 Streamlit, 8188 ComfyUI, 8000 vLLM, 30000 SGLang.
ssh_enabledbooleanOptionalAllow SSH into instances from this template. Defaults to false.
cover_urlstringOptionalCover image URL.
sort_orderintegerOptionalPosition in your list.
enabledbooleanOptionalPublish publicly. Requires editor permission; forced to false otherwise.
Terminal window
curl -X POST https://radeon-global.anruicloud.com/api/profile/templates \
-H "Authorization: Bearer $RADEON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Qwen 7B on vLLM",
"image": "rocm/vllm:latest",
"instance_type": "vllm",
"start_command": "vllm serve Qwen/Qwen2.5-7B-Instruct --host 0.0.0.0 --port 8000",
"app_port": 8000
}'

An app_port outside the routable set is rejected with 400.

PUT /api/profile/templates/{template_id} Session or API key

Same body as creation. 404 if the template doesn’t exist or isn’t yours.

Changes apply to future launches. A running instance keeps the configuration it started with.

DELETE /api/profile/templates/{template_id} Session or API key
{ "success": true }

Deleting a template doesn’t affect an instance already running from it.

POST /api/templates/{template_id}/launch Session or API key
ParameterTypeDescription
gpu_countintegerOptional1, 2, or 4. Defaults to 1.
launch_verification_tokenstringOptionalRequired only when the account has launch verification enabled.

Returns the same status object as POST /api/notebook/request. Poll GET /api/notebook/status from there.

Launches are rate limited to roughly one per minute, three per ten minutes, and five per hour. Exceeding that returns 429 with a Retry-After header.

GET /api/templates None; more with a credential

Returns published templates. Authenticated callers also see their own private ones. Useful for finding a starting point without creating anything.