Файлы и медиа · Изменение
Облако · Библиотека · Подготовка · Загрузка
cloud_library_prepare_upload
Попробуйте три запроса
Подготовить
- Вы указываетеParentid
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Облако / Библиотека / Подготовка / Загрузка». Для изменения нужны ID записи, название. Покажи объект и ожидаемый эффект до выполнения.
- id
- Id записи
- name
- Название
- mime
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Облако / Библиотека / Подготовка / Загрузка» с параметром name = Осенняя коллекция. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- name
- Осенняя коллекция
- analysisEnabled
- true
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Облако / Библиотека / Подготовка / Загрузка» по исходному ответу. Покажи companyId. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Prepare an R2 upload. Reuse the file UUID and original arguments on retry. Use cloud_library_upload_status for current parts and a fresh byte-upload URL after interruption or expiry. PUT file bytes in partSize chunks to uploadBase/{zero-based index}, skipping received indices, then complete the upload. Set analysisEnabled to control AI. For an audio note, supply parentId and attach the completed note with update_metadata using parentId:voice:audioId.
Параметры запроса
- id
- Идентификатор выбранной записи. обязательно по схеме · string
- name
- Native name value; use the value and type returned by the corresponding service. обязательно по схеме · string · до символов 240
- mime
- Native mime value; use the value and type returned by the corresponding service. обязательно по схеме · string · до символов 120
- bytes
- Native bytes value; use the value and type returned by the corresponding service. обязательно по схеме · integer · максимум 5368709120
- metadata
- Native metadata value; use the value and type returned by the corresponding service. необязательно · object
- analysisEnabled
- Native analysisEnabled value; use the value and type returned by the corresponding service. необязательно · boolean
- parentId
- Native parentId value; use the value and type returned by the corresponding service. необязательно · string
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- companyId
- Native companyId value; use the value and type returned by the corresponding service. обязательно по схеме · string
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Client-generated UUID. Reuse for every retry of the same file."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 240,
"description": "Native name value; use the value and type returned by the corresponding service."
},
"mime": {
"type": "string",
"maxLength": 120,
"description": "Native mime value; use the value and type returned by the corresponding service."
},
"bytes": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 5368709120,
"description": "Native bytes value; use the value and type returned by the corresponding service."
},
"metadata": {
"description": "Native metadata value; use the value and type returned by the corresponding service.",
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 240,
"description": "Native title value; use the value and type returned by the corresponding service."
},
"purpose": {
"type": "string",
"maxLength": 8000,
"description": "Native purpose value; use the value and type returned by the corresponding service."
},
"category": {
"type": "string",
"maxLength": 190,
"description": "Native category value; use the value and type returned by the corresponding service."
},
"folder": {
"type": "string",
"maxLength": 190,
"description": "Native folder value; use the value and type returned by the corresponding service."
},
"tags": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"description": "Native tags value; use the value and type returned by the corresponding service."
},
"services": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"description": "Native services value; use the value and type returned by the corresponding service."
},
"products": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"description": "Native products value; use the value and type returned by the corresponding service."
},
"serviceIds": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[\\w~:@+.-]+$"
},
"description": "Native serviceIds value; use the value and type returned by the corresponding service."
},
"productIds": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[\\w~:@+.-]+$"
},
"description": "Native productIds value; use the value and type returned by the corresponding service."
},
"channelDecisions": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"instagram",
"facebook",
"youtube",
"tiktok",
"threads",
"telegram",
"whatsapp"
]
},
"additionalProperties": {
"type": "string",
"enum": [
"yes",
"no",
"unset"
]
},
"description": "Native channelDecisions value; use the value and type returned by the corresponding service."
},
"channelReasons": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"instagram",
"facebook",
"youtube",
"tiktok",
"threads",
"telegram",
"whatsapp"
]
},
"additionalProperties": {
"type": "string",
"maxLength": 190
},
"description": "Native channelReasons value; use the value and type returned by the corresponding service."
},
"stars": {
"type": "boolean",
"description": "Native stars value; use the value and type returned by the corresponding service."
},
"w": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 150000,
"description": "Native w value; use the value and type returned by the corresponding service."
},
"h": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 150000,
"description": "Native h value; use the value and type returned by the corresponding service."
},
"duration": {
"type": "string",
"maxLength": 190,
"description": "Native duration value; use the value and type returned by the corresponding service."
},
"src": {
"type": "string",
"maxLength": 80000,
"pattern": "^data:image\\/webp;base64,[A-Za-z0-9+/=]+$",
"description": "Native src value; use the value and type returned by the corresponding service."
},
"voiceNote": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 100,
"description": "Native id value; use the value and type returned by the corresponding service."
},
"name": {
"type": "string",
"maxLength": 190,
"description": "Native name value; use the value and type returned by the corresponding service."
},
"mime": {
"type": "string",
"maxLength": 190,
"description": "Native mime value; use the value and type returned by the corresponding service."
},
"duration": {
"description": "Native duration value; use the value and type returned by the corresponding service.",
"type": "string",
"maxLength": 190
}
},
"required": [
"id",
"name",
"mime"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Native voiceNote value; use the value and type returned by the corresponding service."
},
"needsReview": {
"type": "boolean",
"description": "Native needsReview value; use the value and type returned by the corresponding service."
},
"transcript": {
"type": "string",
"maxLength": 32000,
"description": "Native transcript value; use the value and type returned by the corresponding service."
},
"voiceTranscript": {
"type": "string",
"maxLength": 32000,
"description": "Native voiceTranscript value; use the value and type returned by the corresponding service."
}
},
"additionalProperties": false
},
"analysisEnabled": {
"description": "Native analysisEnabled value; use the value and type returned by the corresponding service.",
"type": "boolean"
},
"parentId": {
"description": "Native parentId value; use the value and type returned by the corresponding service.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable request ID for these exact arguments. Keep it if the response is uncertain."
}
},
"required": [
"id",
"name",
"mime",
"bytes",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"companyId": {
"type": "string",
"description": "Native companyId value; use the value and type returned by the corresponding service."
}
},
"required": [
"companyId"
],
"additionalProperties": {}
}