DEVUP Docs
Back to Dashboard

Platform Capabilities

OpenAI-compatible embeddings

Embeddings

Generate vector embeddings from text using supported embedding models through the OpenAI-compatible Embeddings API.

Important considerations when using embeddings on DEVUP AI:

  • Model availability varies.
  • Output dimensions may vary by model.
  • Pricing and input limits are model-specific.
  • Applications must use the exact model identifier shown in the live catalog.
POSThttps://api.devupai.com/v1/embeddings

How it works

Text input
Embedding model
Vector
Vector database or app
Similarity search

Input modes

Single input

  • One text
  • One embedding vector
  • Simple interactive requests

Batch input

  • Multiple texts
  • Multiple indexed vectors
  • More efficient ingestion when supported

Quickstart example

The example below uses the verified model Qwen/Qwen3-Embedding-8B.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEVUP_API_KEY"],
    base_url="https://api.devupai.com/v1",
)

response = client.embeddings.create(
    model="Qwen/Qwen3-Embedding-8B",
    input="The food was delicious and the service was excellent.",
)

vector = response.data[0].embedding
print(f"Dimensions: {len(vector)}")

Batch embeddings

The API accepts an array of strings as input. Each input produces a corresponding item in the data array.

  • Use the returned index field to map vectors back to your original inputs, as response order is not guaranteed.
  • Batch size and input limits depend on the selected model.
  • Applications should not assume all providers allow the same batch size.
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEVUP_API_KEY"],
    base_url="https://api.devupai.com/v1",
)

response = client.embeddings.create(
    model="Qwen/Qwen3-Embedding-8B",
    input=[
        "The food was delicious.",
        "The service was excellent."
    ],
)

for item in response.data:
    print(f"Index {item.index} dimensions: {len(item.embedding)}")

Request parameters

Required input

model

Embedding model identifier (e.g., Qwen/Qwen3-Embedding-8B).

input

Text or array of texts to embed.

Output encoding

encoding_format

Format of the embedding vectors. Accepted values are float or base64. Default is float.

Note: Dimensions are model-defined and cannot be selected or overridden by the request on DEVUP AI.

Response anatomy

Input
data[index]
embedding vector
usage metadata

Verified fields

  • object: Always list.
  • data: Array containing the generated vectors.
  • data[].index: Maps the vector back to the input array index.
  • data[].embedding: The embedding vector array.
  • model: The exact model identifier used.
  • usage: Contains prompt_tokens and total_tokens.
  • _devup: Platform-specific metadata (cost and balance).
Illustrative response
json
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.012, -0.084, 0.031, "..."]
    }
  ],
  "model": "Qwen/Qwen3-Embedding-8B",
  "usage": {
    "prompt_tokens": 12,
    "total_tokens": 12
  },
  "_devup": {
    "cost_dzd": 0.0001,
    "balance_dzd": 500.00
  }
}

Dimensions and similarity

An embedding is a numerical vector representing semantic information.

  • Vector length depends entirely on the selected model.
  • Vectors from different embedding models should not normally be mixed in the same index.
  • Similarity metrics and normalization requirements may depend on the model. Check the specific model page for recommended distance metrics.

Practical use cases

Semantic search

Search by meaning rather than exact keywords.

Retrieval-Augmented Generation

Provide context to LLMs (embeddings alone are only part of a complete RAG system).

Clustering & classification

Group similar texts or classify content categories.

Recommendations

Suggest related items based on semantic similarity.

Duplicate detection

Find highly similar or identical text passages.

Input and security guidance

  • Avoid sending secrets or sensitive text unless appropriate for the workload.
  • Validate and normalize application input.
  • Handle empty inputs gracefully before querying the API.
  • Store vectors together with the exact model identifier and model version when available.
  • Re-embed existing data when changing embedding models.
  • Measure retrieval quality using your own dataset.

Pricing and limits

Embedding pricing and input limits are model-specific. Review the live model page before production use.

Browse Embedding Models

What's next