Skip to main content
POST
Generate Image Embedding
Product: Visual Intelligence — Embeddings Use case: Generate vector embeddings for image, video, or text inputs for semantic search and similarity tasks Host: https://mavi-backend.memories.ai/serve/api/v2 Auth: Authorization: sk-mavi-... (no Bearer prefix)
This endpoint generates vector embeddings for images. You can either upload an image file directly or reference an existing asset by its ID.
Pricing:
  • $0.0001 per image

Code Examples

Request Parameters

This endpoint supports two methods of providing images: Method 1: File Upload (multipart/form-data) Method 2: Asset ID (application/json) Supported Models:
  • multimodalembedding@001 - Google’s multimodal embedding model
  • mobileclip - Efficient mobile-optimized CLIP model

Response

Returns the embedding vector synchronously.

Response Parameters

Notes

  • Image embeddings are returned synchronously in the response
  • Embedding dimensions vary by model (typically 512-1024 dimensions)
  • Supported image formats: JPEG, PNG, GIF, WebP, BMP, TIFF
  • Maximum file size may vary by deployment
  • Use the file upload method for one-time embedding generation
  • Use the asset ID method when you’ve already uploaded the image via the /upload endpoint
  • Embeddings can be used for image similarity search, classification, and clustering

Authorizations

Authorization
string
header
required

Body

model
enum<string>
required

Embedding model name

Available options:
multimodalembedding@001,
mobileclip
Example:

"multimodalembedding@001"

file
file

Image file to upload

Response

200 - application/json

Embedding generated successfully

code
string

Response code indicating the result status

Example:

200

msg
string

Response message describing the operation result

Example:

"success"

data
object

Response data object containing the embedding

success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false