CreateModelService

Updated at:
Copy as MD

Creates a model service.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

GwClusterId

string

Yes

The gateway instance ID.

pg-xxxxxxxxxx

Name

string

Yes

The model service name.

test

ModelCategory

string

Yes

The model category.

text

Protocol

string

Yes

The protocol type.

openai

BaseUrl

string

Yes

The URL of the upstream service.

xxxx

ApiKey

string

Yes

The API key for the model service.

xxxx

InputCostPointsPerMillion

string

No

The billing cost for input, measured in points per one million tokens.

10

OutputCostPointsPerMillion

string

No

The billing cost for output, measured in points per one million tokens.

10

RequestCostPoints

string

No

The billing cost per request, measured in points.

10

Vendor

string

Yes

The model service provider. The example value bailian is a pinyin-based identifier that corresponds to the product name Model Studio.

bailian

RegionId

string

No

The region ID.

cn-beijing

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

69A85BAF-1089-4CDF-A82F-0A140F******

ModelServiceId

string

The model service ID.

ms-xxxxxx

Status

string

The status of the model service.

Enable

Examples

Success response

JSON format

{
  "RequestId": "69A85BAF-1089-4CDF-A82F-0A140F******",
  "ModelServiceId": "ms-xxxxxx",
  "Status": "Enable"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.