Embed documents
Perform embedding on a Telnyx Storage Bucket using the a embedding model. The current supported file types are:
- HTML
- txt/unstructured text files
- json
- csv
- audio / video (mp3, mp4, mpeg, mpga, m4a, wav, or webm ) - Max of 100mb file size.
Any files not matching the above types will be attempted to be embedded as unstructured text.
This process can be slow, so it runs in the background and the user can check the status of the task using the endpoint /ai/embeddings/{task_id}.
Important Note: When you update documents in a Telnyx Storage bucket, their associated embeddings are automatically kept up to date. If you add or update a file, it is automatically embedded. If you delete a file, the embeddings are deleted for that particular file.
You can also specify a custom loader param. Currently the only supported loader value is intercom which loads Intercom article jsons as specified by the Intercom article API This loader will split each article into paragraphs and save additional parameters relevant to Intercom docs, such as article_url and heading. These values will be returned by the /v2/ai/embeddings/similarity-search endpoint in the loader_metadata field.
Headers
Optional opaque, unquoted key for safely retrying the same logical request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores. Generate a unique UUID v4 for each operation and reuse it only when retrying that operation with the same request. Invalid headers—including duplicate, empty, malformed, or overlong values—return 400 with error code 10015. A request already in progress with the same key returns 409; reusing the key with a different request returns 422. Only successful responses are replayed, for up to 24 hours. Do not include sensitive data in the key.
Request body
Response
Successful Response
Changes
Changed in 2 of the 99 revisions of this API.136
- ●
added the new
10011enum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
domain_graduation_limit_exceededenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
- ▲
the response's body type changed from
objectto no type for statusresponse-body-type-changed
- ●
removed the optional property
from the response with the statusresponse-optional-property-removed
- ○
added the new optional
headerrequest parameterIdempotency-Keynew-optional-request-parameter
- ○
added to the response body
anyOflist for the response statusresponse-body-any-of-added
- ○
added the non-success response with the status
response-non-success-status-added
- ○
added the non-success response with the status
response-non-success-status-added
- ○
added the non-success response with the status
response-non-success-status-added
- ○
added the non-success response with the status
response-non-success-status-added
This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
Of the 99 revisions, 1 has no diff computed.