Skip to main content
POST
/
v1
/
namespace
/
{namespaceId}
/
documents
/
{documentId}
/
chunks-download-url
TypeScript
import { Agentset } from "agentset";

const agentset = new Agentset({ apiKey: 'agentset_xxx' });
const ns = agentset.namespace('ns_xxx');

const { url } = await ns.documents.getChunksDownloadUrl("doc_123");
const data = await (await fetch(url)).json();
console.log(data);
{
  "success": true,
  "data": {
    "url": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

namespaceId
string
required

The id of the namespace (prefixed with ns_)

Example:

"ns_123"

documentId
string
required

The id of the document (prefixed with doc_)

Example:

"doc_123"

Response

The presigned download URL for the chunks

success
boolean
required
data
object
required