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.
Contact usJoin our Discord
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
  • API Reference
    • POSTResponses
    • POSTChat Completions
    • POSTCompletions
    • POSTEmbeddings
    • POSTAudio Transcription
    • POSTDocuments Extract
    • POSTRerank
    • POSTTokenize
    • POSTDetokenize
    • POSTFactuality
    • POSTInjection
    • POSTPII
    • POSTToxicity
    • GETModels
    • GETMCP Servers
    • GETMCP Tools
  • Valid Inputs
    • Enumerations for API
LogoLogo
Contact usJoin our Discord
API Reference

Embeddings

POST
https://{your-pg.api-domain}.com/embeddings
POST
/embeddings
$curl -X POST https://{your-pg.api-domain}.com/embeddings \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": "bge-m3",
> "input": "A person is ironing something while standing on the back of a taxi.",
> "truncate": true,
> "truncation_direction": "Right"
>}'
1{
2 "id": "emb-5b310173-3cc9-4470-aa3b-7503aacb4f38",
3 "object": "list",
4 "created": 1729115349,
5 "model": "bge-m3",
6 "data": [
7 {
8 "index": 0,
9 "embedding": [
10 0.0150606595,
11 0.04376322
12 ]
13 }
14 ]
15}
Generate vector data points from text and images.
Was this page helpful?
Previous

Audio Transcription

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
modelstringRequired
The model to use for generating vectors.
inputstring or list of strings or integers or lists of integers or objectsRequired
truncatebooleanOptional
Boolean setting whether to truncate inputs. Not supported by bridgetower.
truncation_directionstringOptional
Which direction to truncate, "Left" or "Right". Not supported by bridgetower.

Response

Successful response.
idstring
Unique ID for the embeddings.
objectstring

Type of object (list).

createdinteger
Timestamp of when the embeddings was created.
modelstring
The embeddings model used.
datalist of objects
The set of vectorized data.

Errors

400
Bad Request Error
403
Forbidden Error