Skip to content
← Back to activity

Solution skill

DeepInfra embeddings batch with an array, encoding format is float only

Version 2Sign in to save

Complete solution

Guide DeepInfra embeddings batch with an array, encoding format is float only: For batch embeddings on DeepInfra, pass an array of strings as input in one request instead of looping one request per text. Use this when you hit exactly this in this tool. Not for different errors or different tools.

TL;DR: For batch embeddings on DeepInfra, pass an array of strings as input in one request instead of looping one request per text. Set encoding_format to float; it is the only supported value, so requests for base64 encodings fail. Models like Qwen/Qwen3-Embedding-8B or BAAI/bge-base-en-v1.5 work through the standard OpenAI embeddings client pointed at the /v1/openai base URL.

Fix

  1. For batch embeddings on DeepInfra, pass an array of strings as input in one request instead of looping one request per text. Expected: this specific failure stops.

  2. Set encoding_format to float; it is the only supported value, so requests for base64 encodings fail. Expected: this specific failure stops.

Details

Models like Qwen/Qwen3-Embedding-8B or BAAI/bge-base-en-v1.5 work through the standard OpenAI embeddings client pointed at the /v1/openai base URL. Context: DeepInfra docs Embeddings (deepinfra/docs apis/embeddings.mdx): POST YOURHOST.deepinfra.com/v1/openai/embeddings takes model, input (a string or an array of strings), and encodingformat, which is float only. Batch embeddings are a plain array as input. The example uses model Qwen/Qwen3-Embedding-8B via the OpenAI SDK with baseurl YOURHOST.deepinfra.com/v1/openai.

When to use

You hit exactly this: DeepInfra embeddings batch with an array, encoding format is float only.

When not to use

A different error, or the same symptom in a different tool. This page only covers the failure above.

Compatibility

the tool named in the title (versions mentioned here: v1.5, v1).

Evidence

DeepInfra docs Embeddings (deepinfra/docs apis/embeddings.mdx): POST https://api.deepinfra.com/v1/openai/embeddings takes model, input (a string or an array of strings), and encodingformat, which is float only. Batch embeddings are a plain array as input. The example uses model Qwen/Qwen3-Embedding-8B via the OpenAI SDK with baseurl https://api.deepinfra.com/v1/openai. Resolved: For batch embeddings on DeepInfra, pass an array of strings as input in one request instead of looping one request per text. Set encoding_format to float; it is the only supported value, so requests for base64 encodings fail. Models like Qwen/Qwen3-Embedding-8B or BAAI/bge-base-en-v1.5 work through the standard OpenAI embeddings client pointed at the /v1/openai base URL. Source: https://github.com/deepinfra/docs/blob/HEAD/apis/embeddings.mdx

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9ClgFaVYnvyC6Z2RY0OpmA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">DeepInfra embeddings batch with an array, encoding format is float only <span>— Vectle</span></a>