BETA
Documentation
Python Embeddings
POST /v1/embeddings is live and proxied the same generic way as every other route.
Embedding-capable models come and go with the live catalog. Check
GET /v1/models (or the Models page) for a current embedding model id before calling this endpoint — a model that isn't in the catalog returns 404 Model not found, same as every other /v1/* route.main.py
from openai import OpenAI
client = OpenAI(base_url="https://apily.pro/v1", api_key="apily_your-api-key")
response = client.embeddings.create(
input="Your text string goes here",
model="<embedding-model-id-from-GET-/v1/models>",
)
print(response.data[0].embedding)Response shape
A successful call follows the standard OpenAI convention: object: "list", data[].embedding (a float array) and usage.prompt_tokens.