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

List saved workspace Provider assets

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

GET /v1/media/assets

Requires a workspace inference API key, current model permissions, composed workspace/key model and Provider grants, an enabled selectable credential and eligible Provider or matching personal owner. Only the explicitly configured fastrouter-actions-v1 model channel is supported. Opaque Provider references, credentials, private source URLs and upstream raw responses are never returned. Lists only locally saved owned rows; it never performs a global Provider list request.

Operation: list_assetsProviderAsset.

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

JSON
[
{
"bearerAuth": []
},
{
"niuApiKeyAuth": []
}
]

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.

Authentication alternative: bearerAuth.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/v1/media/assets" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
--url-query 'model=<MODEL>'

Authentication alternative: niuApiKeyAuth.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/v1/media/assets" \
-H "X-Niu-API-Key: $NIU_API_KEY" \
--url-query 'model=<MODEL>'

Location: query. Required.

JSON
{
"type": "string"
}

Location: query. Optional.

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

Location: query. Optional.

JSON
{
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
}

Location: query. Optional.

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

No request body is declared.

Owned metadata

Content type: application/json.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"data",
"next_cursor"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"group_id",
"model",
"kind",
"status",
"revision",
"created_at_ms",
"updated_at_ms",
"observation"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"group_id": {
"type": "string",
"format": "uuid"
},
"model": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string",
"enum": [
"image",
"audio",
"video"
]
},
"status": {
"type": "string"
},
"revision": {
"type": "string",
"pattern": "^[1-9][0-9]*$"
},
"created_at_ms": {
"type": "integer",
"format": "int64"
},
"updated_at_ms": {
"type": "integer",
"format": "int64"
},
"observation": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"source",
"status",
"name",
"observed_at_ms"
],
"properties": {
"source": {
"type": "string",
"const": "provider_get"
},
"status": {
"type": "string",
"enum": [
"processing",
"active",
"failed"
]
},
"name": {
"type": [
"string",
"null"
],
"maxLength": 64
},
"observed_at_ms": {
"type": "integer",
"format": "int64",
"description": "Server time of the saved successful Provider read. Historical observation, not a current availability guarantee."
}
}
},
{
"type": "null"
}
],
"description": "Last successful identity-validated Provider Get metadata, independent of mutation status. Null before any successful read. An observation never acknowledges or unblocks unknown writes, grants dispatch or proves an uncertain write completed."
}
}
}
},
"next_cursor": {
"type": [
"string",
"null"
],
"format": "uuid"
}
}
}

Malformed or unsupported request fields

Missing, expired or revoked API key

Workspace or key policy refuses access

Owned object or model unavailable

Changed input, stale revision, unresolved identity or route conflict

Request exceeds its bounded size

Selected channel does not support asset management

Provider read failed safely

Credential, capacity or bounded storage unavailable

Requires a workspace inference API key, current model permissions, composed workspace/key model and Provider grants, an enabled selectable credential and eligible Provider or matching personal owner. Only the explicitly configured fastrouter-actions-v1 model channel is supported. Opaque Provider references, credentials, private source URLs and upstream raw responses are never returned. Lists only locally saved owned rows; it never performs a global Provider list request.

Supported scope: implemented