Knowledge Bases

Generate a file upload URL

Returns a pre-signed URL for uploading one file, along with the storage key you pass to Ingest uploaded files. Upload the file to the URL with a PUT request before calling that endpoint. The URL is valid for one hour.

get/knowledge-bases/{kb_id}/files/upload-url

Request

  • Base URL: https://console.hyperstack.cloud/ai/api/v1
  • URL: https://console.hyperstack.cloud/ai/api/v1/knowledge-bases/{kb_id}/files/upload-url
  • Auth: API key in header api_key

Path parameters

kb_idinteger required

Numeric ID of the knowledge base. Call the List knowledge bases API to retrieve the id of an existing knowledge base.

Query parameters

filenamestring required

Name of the file you are uploading.

mime_type'text/plain' | 'text/markdown' required

MIME type of the file. Only text/plain and text/markdown are accepted.

Response

The pre-signed upload URL.

signed_urlstring

Pre-signed URL to PUT the file to. Valid for one hour.

s3_keystring

Storage key for the uploaded file. Pass this to the ingest endpoint.

Changes

No recorded changes to this operation across all 1 revision of this API.