Документация / Как начать / Работа с MCP / Идентификаторы и страницы результатов / REST: media / importMediaFiles Для AI-агентов: markdown этой страницы — /docs/api-op-importmediafiles.md · индекс документации — /llms.txt
importMediaFiles Обновлено 10 октября 2026 г.
POST /api/v1/media/import
importMediaFiles
# Авторизация и праваScopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.
Поле Значение security.0.hubApiKey [] security.1.hubBearer [] securitySchemes.hubApiKey.in "header" securitySchemes.hubApiKey.name "X-Api-Key" securitySchemes.hubApiKey.type "apiKey" securitySchemes.hubBearer.scheme "bearer" securitySchemes.hubBearer.type "http" x-required-scopes ["content:write"]
# Параметры запросаПоле Значение 0.description "Required for a nonempty POST body by the canonical 24-hour HTTP response receipt." 0.in "header" 0.name "Idempotency-Key" 0.required true 0.schema 0.schema
# Тело запроса# ОтветыПоле Значение 200.content.application/json.schema 200.content.application/json.schema 200.description "COMMITTED: imported into immutable tenant media storage, with publishable media references. IMPORTING: the transfer continues in the background; read GET /api/v1/media/uploads/{uploadId}. STAGING: nothing is running; repeat with the same idempotency_key and a new Idempotency-Key header" 200.headers.X-Bot-Username.description "Authenticated public bot username, when available" 200.headers.X-Bot-Username.schema 200.headers.X-Bot-Username.schema 200.headers.X-Client-Slug.description "Authenticated tenant slug, when available" 200.headers.X-Client-Slug.schema 200.headers.X-Client-Slug.schema 200.headers.X-RateLimit-Limit.description "Effective request budget" 200.headers.X-RateLimit-Limit.schema 200.headers.X-RateLimit-Limit.schema 200.headers.X-RateLimit-Remaining.description "Remaining budget or unknown" 200.headers.X-RateLimit-Remaining.schema 200.headers.X-RateLimit-Remaining.schema 200.headers.X-RateLimit-Reset.description "Window reset Unix seconds" 200.headers.X-RateLimit-Reset.schema 200.headers.X-RateLimit-Reset.schema
# ОшибкиПоле Значение 400.content.application/problem+json.schema ProblemDetails 400.description "VALIDATION_ERROR: malformed import request, or files and sources together outside 1..10; IDEMPOTENCY_KEY_REQUIRED: missing nonempty POST key" 401.content.application/problem+json.schema ProblemDetails 401.description "Missing or invalid API key" 403.content.application/problem+json.schema ProblemDetails 403.description "PLAN_UPGRADE_REQUIRED: the plan has no media import (details.plan); otherwise scope or resource policy refused the request" 409.content.application/problem+json.schema ProblemDetails 409.description "MEDIA_MANIFEST_CONFLICT: this idempotency_key was already used for other files; CONFLICT: HTTP replay key is processing" 413.content.application/problem+json.schema ProblemDetails 413.description "PAYLOAD_TOO_LARGE or ITEM_COUNT_EXCEEDED: per-tool resource limits" 422.content.application/problem+json.schema ProblemDetails 422.description "MEDIA_SOURCE_NOT_ALLOWED, MEDIA_SOURCE_UNAVAILABLE, MEDIA_SOURCE_REDIRECT_REFUSED, MEDIA_METHOD_UNSUPPORTED, MEDIA_LENGTH_REQUIRED, MEDIA_TRANSFER_TIMEOUT (details.origin); MEDIA_MIME_MISMATCH, MEDIA_MAGIC_MISMATCH, MEDIA_SIZE_MISMATCH, MEDIA_ABORTED; MEDIA_TOO_LARGE, MEDIA_BATCH_TOO_LARGE (details.limitBytes, details.plan), MEDIA_TOO_MANY_FILES (details.limitFiles); VALIDATION_ERROR: unrecognized media bytes; IDEMPOTENCY_KEY_MISMATCH: different request under the same HTTP key" 429.content.application/problem+json.schema ProblemDetails 429.description "RATE_LIMIT_EXCEEDED or RATE_LIMIT_UNAVAILABLE: resource budget refusal" 429.headers.Retry-After.description "Retry delay in seconds, when supplied by the limiter" 429.headers.Retry-After.schema 429.headers.Retry-After.schema 500.content.application/problem+json.schema ProblemDetails 500.description "INTERNAL_ERROR: unexpected failure; no internal payload is exposed"
# Дополнительные условияПоле Значение operationId "importMediaFiles" tags ["media"] x-idempotency "http-cache"