Create a model image definition
POST
/v1/model-image-definitionscurl -X POST 'https://api.embodiflow.io/v1/model-image-definitions' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"projectId": "00000000-0000-0000-0000-000000000000",
"code": "string",
"name": "string",
"description": "string",
"imageKind": "training",
"category": "string",
"tags": [
"string"
],
"imageRef": "string",
"runnerContractVersion": "string",
"paramSchema": {},
"outputSchema": {},
"resourceDefaults": {},
"minGpuMemoryGb": 0,
"recommendedGpuMemoryGb": 0,
"maxGpuCount": 0,
"supportsMultiGpu": true,
"frameworkTags": [
"string"
],
"registryServer": "string",
"registryUsername": "string",
"registryPassword": "string"
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
请求头参数
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
请求体
Content-Typeapplication/json
- projectIdstring (uuid) | null
- codestring | null
- namestring必填
- descriptionstring | null
- imageKindstring必填可选值traininginference
- categorystring | null
- tagsarray<string>
- imageRefstring | null
- runnerContractVersionstring | null
- paramSchemaobject | null
- outputSchemaobject | null
- resourceDefaultsobject | null
- minGpuMemoryGbnumber | null
- recommendedGpuMemoryGbnumber | null
- maxGpuCountnumber | null
- supportsMultiGpuboolean
- frameworkTagsarray<string>
- registryServerstring | null
- registryUsernamestring | null
- registryPasswordstring | null
响应
Success
- dataobject必填
- idstring必填
- tenantIdstring | null必填
- projectIdstring | null必填
- codestring必填
- namestring必填
- descriptionstring | null必填
- imageKindstring必填可选值traininginference
- statusstring必填
- ownerTypestring必填
- systemSlugstring | null必填
- categorystring | null必填
- tagsarray<string>必填
- thumbnailUrlstring | null必填
- documentationUrlstring | null必填
- latestRevisionIdstring | null必填
- createdAtstring必填
- updatedAtstring必填
- modelFamilystring | null
- frameworkstring | null
- frameworkKindstring | null可选值officialconvenience
- isOfficialDefaultone of | null
响应示例
{
"data": {
"id": "string",
"tenantId": "string",
"projectId": "string",
"code": "string",
"name": "string",
"description": "string",
"imageKind": "training",
"status": "string",
"ownerType": "string",
"systemSlug": "string",
"category": "string",
"tags": [
"string"
],
"thumbnailUrl": "string",
"documentationUrl": "string",
"latestRevisionId": "string",
"createdAt": "string",
"updatedAt": "string",
"modelFamily": "string",
"framework": "string",
"frameworkKind": "official",
"isOfficialDefault": false
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1