For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
      • POSTUpload Document
      • GETRetrieve Document
      • GETList Documents
      • PATCHUpdate Document
      • DELDestroy
LogoLogo
BlogLog InRequest Demo
Client SDKDocuments

Retrieve Document

Beta
GET
https://api.vellum.ai/v1/documents/:id
GET
/v1/documents/:id
1import requests
2
3url = "https://api.vellum.ai/v1/documents/id"
4
5headers = {"X-API-KEY": "<apiKey>"}
6
7response = requests.get(url, headers=headers)
8
9print(response.json())
200Retrieved
1{
2 "id": "string",
3 "last_uploaded_at": "2024-01-15T09:30:00Z",
4 "label": "string",
5 "processing_state": "QUEUED",
6 "original_file_url": "string",
7 "document_to_document_indexes": [
8 {
9 "id": "string",
10 "environment_document_index_id": "string",
11 "document_index_id": "string",
12 "extracted_text_file_url": "string",
13 "processing_state": "string",
14 "indexing_state": "AWAITING_PROCESSING"
15 }
16 ],
17 "external_id": "string",
18 "status": "ACTIVE",
19 "keywords": [
20 "string"
21 ],
22 "metadata": {}
23}

Retrieve a Document, keying off of either its Vellum-generated ID or its external ID.

Was this page helpful?
Previous

List Documents

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

idstringRequiredformat: "^[^/]+$"

Headers

X-API-VersionstringOptional

Response

idstringformat: "uuid"
last_uploaded_atstringformat: "date-time"
labelstring<=1000 characters

A human-readable label for the document. Defaults to the originally uploaded file’s file name.

processing_stateenum
  • QUEUED - Queued
  • PROCESSING - Processing
  • PROCESSED - Processed
  • FAILED - Failed
  • UNKNOWN - Unknown
Allowed values:
original_file_urlstring or null
document_to_document_indexeslist of objects
external_idstring or null<=1000 characters
The unique id of this document as it exists in the user's system.
statusenum

The current status of the document

  • ACTIVE - Active
Allowed values:
keywordslist of strings
A list of keywords that'll be associated with the document. Used as part of keyword search.
metadatamap from strings to any or null
A previously supplied JSON object containing metadata that can be filtered on when searching.