curl --request GET \
--url https://api.ppinfra.com/gpu-instance/openapi/v1/templates \
--header 'Authorization: <authorization>'{
"template": [
{
"Id": "<string>",
"name": "<string>",
"readme": "<string>",
"type": "<string>",
"channel": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"entrypoint": "<string>",
"rootfsSize": 123,
"ports": [
{}
],
"envs": [
{}
],
"tools": [
{}
],
"createdAt": "<string>",
"recommendCards": [
{}
],
"minCudaVersion": "<string>"
}
],
"total": 123
}curl --request GET \
--url https://api.ppinfra.com/gpu-instance/openapi/v1/templates \
--header 'Authorization: <authorization>'{
"template": [
{
"Id": "<string>",
"name": "<string>",
"readme": "<string>",
"type": "<string>",
"channel": "<string>",
"image": "<string>",
"imageAuth": "<string>",
"startCommand": "<string>",
"entrypoint": "<string>",
"rootfsSize": 123,
"ports": [
{}
],
"envs": [
{}
],
"tools": [
{}
],
"createdAt": "<string>",
"recommendCards": [
{}
],
"minCudaVersion": "<string>"
}
],
"total": 123
}official:官方模板community:社区模板private:私有模板隐藏 properties
instance。official、community、private。curl --location --request GET 'https://api.ppinfra.com/gpu-instance/openapi/v1/templates?pageSize=10&pageNum=1&name=test&channel=private&isMyCommunity=true' \
--header 'Authorization: Bearer {{API 密钥}}'
{
"template": [
{
"Id": "1",
"name": "Pytorch:v2",
"readme": "...",
"type": "instance",
"channel": "official",
"image": "test-image.ppinfra.com/test-public/pytorch:v2",
"imageAuth": "",
"startCommand": "",
"entrypoint": "",
"rootfsSize": 100,
"ports": [
{"type": "http", "ports": [80]},
{"type": "tcp", "ports": [7860]}
],
"envs": [{"key": "test", "value": "template"}],
"tools": [{"name": "Jupyter", "describe": "Start Jupyter Notebook", "port": 8888, "type": "http"}],
"createdAt": "1715760544",
"recommendCards": [{"gpuSpecId": "4090.18c.60g", "cardNum": "2"}],
"minCudaVersion": "11.8"
}
],
"total": 12
}