For the complete documentation index, see llms.txt. This page is also available as Markdown.

Save Asset

Service that stores an asset in the context of an operation and returns the key with which it is later referenced.

Endpoint

POST /storage

Headers

Name
Type
Required
Description

Authorization

string

Yes

Consumer Token in Bearer format Bearer <token>. See Authentication.

consumer-id

string

Yes

Consumer identifier.

Request body

Content-Type: application/json

Parameters

Parameter
Type
Required
Description

operationId

string

Yes

Identifier of the operation to which the asset belongs, as returned by Create Operation.

asset

object

Yes

Asset to store.

asset.context

string

Yes

Asset context. See Asset contexts.

asset.file

string

Yes

Content of the asset encoded in Base64, in the format required by its context.

The maximum size per asset is 10 MiB, applied to the encoded content.

Request example

Responses

200 Success

Response parameters

Parameter
Type
Description

fileKey

string

Asset key, in the form {operationId}/{CONTEXTO}. It is sent back unchanged when referencing the asset.

timestamp

string

Response timestamp in format ISO 8601.

Response example

Derived contexts

When storing an asset TOKEN_BIN_IAD the context is also available TOKEN_BEST_IMAGE of the same operation, with the best image from that capture. A TOKEN_BEST_IMAGE may be stored later; if one is already stored, that one is kept.

Query Get File Keys to confirm which contexts are available in the operation.

Other responses

Code
Description

400

The operationId does not have the expected format, the content does not correspond to the declared context, or the asset is empty or exceeds the maximum size.

403

The consumer is not provisioned with the service STORAGE.

404

The operation does not exist or belongs to another consumer.

409

An asset of that context already exists in the operation.

410

The operation has expired.

429

The consumer has exceeded its request rate limit. The response includes Retry-After with the wait seconds, and X-RateLimit-Limit and X-RateLimit-Burst with the current thresholds.

The body of an error response has the form described in MIDAPI v2.

Last updated