Skip to content

Create chunked upload session

POST
/v3/uploads
curl --request POST \
--url https://api.cardio.ai/v3/uploads \
--header 'Content-Type: application/json' \
--header 'X-Api-Token: <X-Api-Token>' \
--data '{ "total_size": 1, "hash_sum": "example" }'

Creates a new session for uploading a file in chunks.

Chunked upload request.

Media typeapplication/json

Request payload for initializing a chunked upload.

object
total_size
required

Total size of the file to be uploaded in bytes.

integer format: int64
>= 1
hash_sum
required

SHA-256 hash of the full file, encoded with standard padded Base64.

string format: byte
>= 44 characters <= 44 characters
Examplegenerated
{
"total_size": 1,
"hash_sum": "example"
}

Successful response containing the upload session ID.

Media typeapplication/json

Response payload for a chunked upload initialization.

object
upload_id
required

Unique identifier for the upload session.

string
Examplegenerated
{
"upload_id": "example"
}

Bad Request - missing or invalid parameters.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Unauthorized - missing, expired, or invalid token.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Unsupported Media Type - Content-Type must be application/json.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}

Too Many Requests - rate limit exceeded.

Media typeapplication/json

Error payload carried by every non-2xx response.

object
message
required

Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.

string
reason

Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.

string
Examplegenerated
{
"message": "example",
"reason": "example"
}