Skip to main content
POST
/
v1
/
embeddings
Embeddings (OpenAI)
curl --request POST \
  --url https://api.ajstudioz.co.in/v1/embeddings \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": {},
  "encoding_format": "<string>"
}
'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.1234, -0.5678, 0.9012, 0.3456, -0.7890, "..."]
    }
  ],
  "model": "gemma3:4b",
  "usage": {
    "prompt_tokens": 10,
    "total_tokens": 10
  }
}

Documentation Index

Fetch the complete documentation index at: https://student-213fb9fc.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Generate vector embeddings for a given input text, fully compatible with the OpenAI /v1/embeddings format. Use with tools like LangChain, LlamaIndex, or any RAG pipeline.

Request

Headers

Authorization
string
required
Bearer token: Bearer YOUR_API_KEY

Body

model
string
required
Model to use. Recommended embedding models: gemma3:4b, gemma3:12b.
input
string or array
required
Text to embed. Can be a single string or array of strings for batch embedding.
encoding_format
string
default:"float"
Format for the returned embeddings. Options: "float" or "base64".

Response

object
string
"list"
data
array
Array of embedding objects:
  • object"embedding"
  • index — index of the input
  • embedding — the vector as an array of floats
model
string
The model used.
usage
object
Token counts: prompt_tokens, total_tokens.

Examples

from openai import OpenAI

client = OpenAI(
    base_url="https://api.ajstudioz.co.in/v1",
    api_key="YOUR_API_KEY"
)

response = client.embeddings.create(
    model="gemma3:4b",
    input="AJ STUDIOZ provides cloud AI inference at scale"
)

embedding = response.data[0].embedding
print(f"Dimensions: {len(embedding)}")
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.1234, -0.5678, 0.9012, 0.3456, -0.7890, "..."]
    }
  ],
  "model": "gemma3:4b",
  "usage": {
    "prompt_tokens": 10,
    "total_tokens": 10
  }
}