Skip to main content

OpenAI (embeddings)

proxium calls OpenAI (embeddings) with your own OpenAI (embeddings) key. Your applications send their requests to proxium with a proxium virtual key. They never hold the OpenAI (embeddings) key.

SettingValue
Preset idopenai-embed
Base URLhttps://api.openai.com/v1
How proxium sends the keyan Authorization: Bearer header
Request formatthe OpenAI Chat Completions format
Request typeembeddings

Add OpenAI (embeddings) to a project​

  1. Get a key from OpenAI (embeddings) at platform.openai.com/api-keys.
  2. In the console, open Providers and select Add a vendor.
  3. In What are you adding, select OpenAI (embeddings). proxium fills in the base URL and the models.
  4. Paste the key into API key, and select Add OpenAI (embeddings).

proxium stores the key encrypted with AES-256-GCM. The console does not show the key again.

Models​

A new OpenAI (embeddings) vendor starts with these models. You can change the list on the Providers screen.

  • text-embedding-3-small
  • text-embedding-3-large

Call a model​

A vendor that you add has the provider id t.<project>.openai-embed, where <project> is the project slug. Send GET /v1/models to get the exact ids that your key can use.

curl https://proxium.tech/v1/embeddings \
-H "Authorization: Bearer $PROXIUM_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "t.<project>.openai-embed/text-embedding-3-small", "input": "The text to embed"}'

You can also send a tier name, such as trial, in model. proxium then picks the model from the routing policy of the project. Refer to Routing.