Skip to main content
POST

Request Parameters

Body

text
string
The text content to generate embeddings for. Optional if providing content through another method.
url
string
The image url.
file_store_key
string
The key used to store the image on Jigsawstack file. Learn more about how to handle files in Jigsawstack’s Handling Files section.
type
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
dimensions
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
instruction
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
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.
token_overflow_mode
string
default:"error"
Determines behavior when input exceeds token limits:
  • error: Return an error (default)
  • truncate: Truncate the input to fit within token limits
speaker_fingerprint
boolean
default:"false"
Whether to include speaker’s audio embedding. Speaker fingerprint is only available for audio content type.
x-api-key
string
required
Your JigsawStack API key

Response Structure

success
boolean
Indicates whether the call was successful.
_usage
object
Usage information for the API call.
log_id
string
A unique identifier for the request
embeddings
number[][]
The vector embedding representation of the input content. This is an array of arrays of floating-point numbers.
chunks
array<string> | array<object>
Array of text chunks with timestamps. Only available for text and audio content types.
speaker_embeddings
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.