Skip to main content
POST

Request Parameters

Body

string
The text content to generate embeddings for. Optional if providing content through another method.
string
The image url.
string
The key used to store the image on Jigsawstack file. Learn more about how to handle files in Jigsawstack’s Handling Files section.
string
required
The type of content being processed. Must be one of the following values:
  • text: Plain text input
  • text-other: Other text format
  • image: Image content
  • audio: Audio content
  • pdf: PDF document
number
default:"4096"
The dimensionality of the output embedding vectors. Higher dimensions can capture more nuanced semantic information but require more storage.
  • Minimum: 32
  • Maximum: 4096
  • Default: 4096
string
Custom instruction for query embedding generation to improve retrieval quality. Works with type text only. Maximum 400 characters.
  • Use this to provide domain-specific context or retrieval objectives
  • Default: Given a query, retrieve relevant passages that answer the query
boolean
default:"false"
Generate embedding for text in query mode by setting query to true.
  • If query is true, you may pass your custom instruction along with text to be embedded as a query string.
string
default:"error"
Determines behavior when input exceeds token limits:
  • error: Return an error (default)
  • truncate: Truncate the input to fit within token limits
boolean
default:"false"
Whether to include speaker’s audio embedding. Speaker fingerprint is only available for audio content type.
string
required
Your JigsawStack API key

Response Structure

boolean
Indicates whether the call was successful.
object
Usage information for the API call.
string
A unique identifier for the request
number[][]
The vector embedding representation of the input content. This is an array of arrays of floating-point numbers.
array<string> | array<object>
Array of text chunks with timestamps. Only available for text and audio content types.
number[][]
The speaker’s audio embedding. Only available for audio content type and when speaker_fingerprint is true. This is an array of arrays of floating-point numbers.