Skip to main content
Training Data

Get a training file

Returns a training file including its extracted text (content). Poll this endpoint after an upload until status is completed.

GET
/v2/training_data/files/{id}
Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

idstringrequired

The training file ID

Example: 67ec1234abcd5678ef901234
Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Example: 2026-08-19.orbit

Response

application/json

Success

characterCountnumber | nullrequired

Characters of extracted text

Example: 12840
contentstring | null

Full extracted text (markdown). Returned when retrieving or updating a single file; omitted from list and create responses.

Example: # Refund policy Customers can request a refund within 30 days of purchase…
contentHashstring | nullrequired

SHA-256 (hex) of the stored source: for inline text and content edits the trimmed text, for uploads and URLs the original bytes. Compare it with your own hash to detect changes without downloading content.

Example: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
contentPreviewstring | nullrequired

First 200 characters of the extracted text

Example: # Refund policy Customers can request a refund within 30 days…
createdAtstringrequired

ISO timestamp of the upload

Example: 2026-09-03T10:15:00.000Z
externalIdstring | nullrequired

Your own identifier for this file, if one was set

Example: kb-article-1842
fileSizenumber | nullrequired

Size of the originally uploaded source in bytes (unchanged by content edits)

Example: 48213
idstringrequired

Training file ID

Example: 67ec1234abcd5678ef901234
indexStatusenum<string>required

Whether the content is searchable by the AI agent. pending while indexing, indexed when the AI agent can use it, failed if indexing failed (the content is stored and indexing is retried hourly).

Available options: pending, indexed, failed
Example: indexed
mimeTypestring | nullrequired

MIME type of the originally uploaded source

Example: application/pdf
namestringrequired

File name shown in the dashboard

Example: refund-policy.pdf
objectenum<string>required

Object type identifier

Available options: training_file
Example: training_file
outcomeenum<string>

On create and update responses: created, updated (same externalId or same name and bytes, content replaced and re-indexed), or unchanged (identical content, nothing done). Absent on reads.

Available options: created, updated, unchanged
Example: created
processingErrorstring | nullrequired

Conversion error message when status is failed

sourcestring | nullrequired

Pipeline label, if one was set

Example: resolved-conversations
statusenum<string>required

processing while the file is being converted to text, completed once the content is stored, failed if conversion failed (see processingError).

Available options: processing, completed, failed
Example: completed
updatedAtstringrequired

ISO timestamp of the last change

Example: 2026-09-03T10:15:30.000Z
wordCountnumber | nullrequired

Words of extracted text

Example: 2130