v4

latestOpenAPI 3.1.02026-08-021957100.4 KB
Batch Embeddings

Create a batch embedding job

Submit a batch of texts for asynchronous embedding processing.

post/v1/batch/embeddings

Request body

model'jina-embeddings-v5-text-nano' | 'jina-embeddings-v5-text-small' required

The embedding model to use for batch processing.

input_urlstring nullable

URL to input JSONL file (GCS, S3, or HTTP). Either input_url or input must be provided.

inputobject[] nullable

Inline JSONL lines for small batches. Either input_url or input must be provided.

taskstring nullable

Task optimization: retrieval, text-matching, clustering, or classification.

dimensionsinteger nullable

Number of dimensions for output embeddings (1-1024).

normalizedboolean nullable

If true (default), embeddings are L2-normalized to unit length.

webhook_urlstring nullable

URL to POST notification when job completes.

Example request

{
  "dimensions": 512,
  "input_url": "gs://my-bucket/inputs.jsonl",
  "model": "jina-embeddings-v5-text-small",
  "task": "retrieval"
}

Response

Successful Response

batch_idstring required

Unique identifier for the batch job.

status'pending' | 'processing' | 'completed' | 'failed' | 'expired' | 'cancelled' required

Current status of the batch job.

modelstring required

The model used for embedding.

created_atstring required

ISO 8601 timestamp when job was created.

completed_atstring nullable

ISO 8601 timestamp when job completed (if finished).

expires_atstring nullable

ISO 8601 timestamp when output URL expires (created_at + 24h).

output_urlstring nullable

Signed URL to download output JSONL (24h expiry).

error_file_urlstring nullable

URL to download error JSONL for failed lines.

errorstring nullable

Error message if job failed.

Example response

{
  "batch_id": "batch_abc123",
  "completed_at": "2024-01-15T10:35:00Z",
  "created_at": "2024-01-15T10:30:00Z",
  "expires_at": "2024-01-16T10:30:00Z",
  "model": "jina-embeddings-v5-text-small",
  "output_url": "https://storage.googleapis.com/...",
  "stats": {
    "completed": 998,
    "failed": 2,
    "total": 1000
  },
  "status": "completed"
}