Skip to main content

Prepare file upload

POST
/ai/gateway/library/files/upload/prepare

Contract

Parameter
Value
Sectionai-gateway
AuthenticationAIKeyAuth
Consumesapplication/json
Producesapplication/json

Parameters

1 parameter

Name
Location
Required
Type
Description
requestbodyyesobjectRequest body: file { name, category, tags, contentBase64 }, idempotencyKey, ttlSeconds, schemaHash
  • {}

Responses

6 responses

Status
Description
Type
200
Successful responseobject
400
Invalid request body or file dataobject
401
API key is missing or invalidobject
403
Required library:write scope is missingobject
409
Idempotency key has already been used for another requestobject
500
Internal server errorobject
  • {
      "cursor": {
        "count": 0,
        "currentPage": 0,
        "totalPages": 0,
        "totalRows": 0
      },
      "data": {}
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }
  • {
      "data": {},
      "error": "<string>"
    }