All Products
Search
Document Center

Platform For AI:CreateAppService

Last Updated:Jun 11, 2026

Membuat layanan aplikasi untuk mendapatkan kemampuan Inferensi model Tingkat Tinggi.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

eas:CreateAppService

create

*All Resource

*

None None

Sintaks permintaan

POST /api/v2/app_services HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

WorkspaceId

string

No

ID ruang kerja.

12****

QuotaId

string

No

ID Kuota.

abcdef

body

object

No

Badan permintaan.

ServiceName

string

Yes

The service name.

foo

AppType

string

Yes

The application service type.

Valid values:

  • LLM

Valid values:

  • LLM :

    LLM

LLM

AppVersion

string

No

The application version.

v1

ServiceSpec

string

Yes

The service specifications. Valid values:

  • llama_7b_fp16

  • llama_7b_int8

  • llama_13b_fp16

  • llama_7b_int8

  • chatglm_6b_fp16

  • chatglm_6b_int8

  • chatglm2_6b_fp16

  • baichuan_7b_int8

  • baichuan_13b_fp16

  • baichuan_7b_fp16

llama_7b_fp16

Replicas

integer

Yes

The number of instances.

1

Config

object

No

The additional configurations that are required for service deployment.

any

No

The application information such as model mounting. Object Storage Service (OSS) mounting and File Storage NAS (NAS) mounting are supported.

  • For OSS mounting, the parameters are configured in the following way: { "ModelStorage": "oss", "OssPath": "oss://examplebucket/xxxx/" }

  • For NAS mounting, the parameters are configured in the following way: { "ModelStorage": "nas", "NasMountTarget": "317d14****-.cn-shanghai.nas.aliyuncs.com", "NasPath": "/", "SecurityGroupID": "sg-uf6e50fazt4u7smt", "VpcID": "vpc-uf66zxxrlv0l4nj49****", "VswitchID": "vsw-uf6fg76uu2bx84tci****" } Parameters:

  • ModelStorage: specifies the service in which the model is stored.

  • OssPath: specifies the OSS bucket directory where the model resides.

  • NasMountTarget: specifies the NAS mount target.

  • NasPath: specifies the NAS path where the files are stored.

  • SecurityGroupID: specifies the ID of the security group that is used to create the NAS file system.

  • VpcID: specifies the ID of the virtual private cloud (VPC) that is used to create the NAS file system.

  • VswitchID: specifies the ID of the vSwitch that is used to create the NAS file system.

{ "ModelStorage": "oss", "OssPath": "oss://examplebucket/xxxx/" }

Elemen respons

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

40325405-579C-4D82****

ServiceId

string

The service ID.

eas-m-aaxxxddf

ServiceName

string

The service name.

foo

Status

string

The service state.

Creating

Region

string

The region ID of the service.

cn-shanghai

InternetEndpoint

string

The public endpoint of the service.

http://pai-eas.cn-shanghai.****

IntranetEndpoint

string

The internal endpoint of the service.

http://pai-eas-vpc.cn-shanghai.****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "40325405-579C-4D82****",
  "ServiceId": "eas-m-aaxxxddf",
  "ServiceName": "foo",
  "Status": "Creating",
  "Region": "cn-shanghai",
  "InternetEndpoint": "http://pai-eas.cn-shanghai.****",
  "IntranetEndpoint": "http://pai-eas-vpc.cn-shanghai.****"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.