星海智算开发文档

Upload an immutable input asset

接口参考来自当前平台公开协议。具体模型的模式和规格请在模型详情中确认。

POST/v1/assets/input

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

model*string

Model alias that scopes the API key publication used to authorize this job or asset.

Header Parameters

X-Client-Request-Id?string

Optional visible ASCII client correlation value, at most 512 bytes. It never replaces the server requestId.

Lengthlength <= 512

Request Body

multipart/form-data

Upload one file using the selected service's mediaSpecContract limits from GET /v1/services. General limits: PNG/JPEG/WebP images 16MiB, WAV audio 25MiB, MP4 video 128MiB. H3 universal references: images 30MiB, MP4 video 50MiB, audio 15MiB in WAV/MP3/FLAC/M4A/AAC/OGG or MOV containing an audio track. Upload H3 MOV using the audio field; original bytes remain reference_audio, not reference_video. H3 audio: 2..15 seconds each, 15 seconds combined, at most 3 clips. H3 first/last-frame images retain their own 16MiB limits.

Upload one file using the selected service's mediaSpecContract limits from GET /v1/services. General limits: PNG/JPEG/WebP images 16MiB, WAV audio 25MiB, MP4 video 128MiB. H3 universal references: images 30MiB, MP4 video 50MiB, audio 15MiB in WAV/MP3/FLAC/M4A/AAC/OGG or MOV containing an audio track. Upload H3 MOV using the audio field; original bytes remain reference_audio, not reference_video. H3 audio: 2..15 seconds each, 15 seconds combined, at most 3 clips. H3 first/last-frame images retain their own 16MiB limits.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

{  "asset": {    "assetId": "string",    "byteSize": 0,    "createdAt": "2019-08-24T14:15:22Z",    "expiresAt": "2019-08-24T14:15:22Z",    "kind": "image",    "lastUploadedAt": "2019-08-24T14:15:22Z",    "mimeType": "string",    "publicationId": "string",    "reused": true,    "status": "available",    "storageBackend": "string"  },  "usage": {}}