Create an LLM endpoint (workspace endpoint)¶
Save an access endpoint for the specified LLM backend.
POST https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/llm/backends/{backend_id}/endpoints
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Configure identity, Workspace, and object permissions in the same environment.
Request¶
curl --request POST \
"$BASE_URL/workspaces/$WORKSPACE_ID/llm/backends/$BACKEND_ID/endpoints" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data-raw '{"address":"https://provider.example.invalid/v1"}'
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Header |
string |
Yes |
Workspace ID in the same environment. |
|
Path |
string |
Yes |
Workspace ID in the same environment. |
|
Path |
integer |
Yes |
Positive ID returned by an earlier read. |
|
Body |
string |
Yes |
Nonempty access URL after trimming surrounding whitespace. |
Requires backend update permission. Save the returned endpoint id; its initial state is online. Marking it online does not verify service health or model capability. There is no separate endpoint deletion operation; adjust its state as needed.
Successful response¶
{
"code": 0,
"data": {
"id": 21,
"backend_id": 12,
"address": "https://provider.example.invalid/v1",
"created_at": 1794445200,
"updated_at": 1794445200
}
}
HTTP 201。
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
object |
Error response¶
Errors and result confirmation distinguishes the two protocols. Parse omitted fields, SDK zero values, and empty HTTP responses separately. Confirm writes using the corresponding read operation.