Skip to main content




The File Upload API can be used to index binary files like PDFs, Word Documents, and similar. Vectara will attempt to automatically extract the text and any metadata from the document like author or title, though you can provide additional metadata as well.

Some tips for this API:

  • This operation authenticates with either the Personal API Key, Index API Key, or OAuth 2.0 (in a JWT "Bearer Token"). You can find details of how to set up an API key or use OAuth 2.0 here.
  • You can find a full list of supported file formats here.
  • To provide additional metadata, set the doc_metadata field. You can find some additional details here
  • PDFs must contain text: Vectara does not currently support indexing scanned images via OCR.


Query Parameters

    c integerrequired

    Customer ID

    o integerrequired

    Corpus ID

    Example: 1
    d boolean

    If true, the server returns the extracted document that was indexed


    doc_metadata string

    A JSON string of any additional metadata you want attached to the file.

    file binaryrequired

    The file to be indexed into Vectara.


A successful response

    response object
    status object
    quotaConsumed object
    numChars string

    The number of characters Vectara indexed from the file uploaded.

    numMetadataChars string

    The number of metadata characters Vectara indexed from the file uploaded.