Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Set vendor integration identity

Generated from the checked-in source. Do not edit this reference by hand.

PUT /api/v1/vendors/{id}/integration

Platform administration required. Integration identity is independent of the inference adapter, endpoint, credential and prices. An unspecified default resolves to custom without claiming detection. A connection can override its Provider default; null restores inheritance. Writes require the current local revision (zero before the first save) and never overwrite a concurrent edit. This operation does not discover models, grant upstream management rights, publish rates or dispatch inference.

Operation: setVendorIntegration.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.

Shell
curl --fail-with-body -X PUT "$NIU_ORIGIN/api/v1/vendors/{id}/integration" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
-H 'Content-Type: application/json' \
--data @request.json

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"integration_type",
"expected_revision"
],
"properties": {
"integration_type": {
"type": [
"string",
"null"
],
"enum": [
"openrouter",
"newapi",
"litellm",
"custom",
null
]
},
"expected_revision": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
}

Current integration selection and effective source

Content type: application/json.

JSON
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"integration_type",
"effective_type",
"source",
"revision"
],
"properties": {
"integration_type": {
"type": [
"string",
"null"
],
"enum": [
"openrouter",
"newapi",
"litellm",
"custom",
null
]
},
"effective_type": {
"type": "string",
"enum": [
"openrouter",
"newapi",
"litellm",
"custom"
]
},
"source": {
"type": "string",
"enum": [
"connection",
"provider",
"unspecified"
]
},
"revision": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
}
}
}

Invalid integration or revision

Authentication required

Platform administration required

Resource not found

Configuration changed concurrently

Storage unavailable

Platform administration required. Integration identity is independent of the inference adapter, endpoint, credential and prices. An unspecified default resolves to custom without claiming detection. A connection can override its Provider default; null restores inheritance. Writes require the current local revision (zero before the first save) and never overwrite a concurrent edit. This operation does not discover models, grant upstream management rights, publish rates or dispatch inference.

Supported scope: implemented