Skip to main content

Quickstart

In this tutorial, you send your first chat call through proxium. You add OpenAI to your project with your own OpenAI key. Then you make a virtual key, find a model id, and send the call. At the end, you see the call in the console.

You need:

1. Open your project​

proxium makes a project for you when you first sign in. The console shows its name at the top of the screen.

If the console shows One thing first, proxium could not make the project. Make it yourself:

  1. Type a name in Project name.
  2. Select Create project.

2. Add OpenAI to the project​

A new project has no provider. Until you add one, the console shows the banner No AI endpoints available — this project cannot send any requests yet. A call from this project then gets 400 no models available for route.

  1. In the console, open Providers.
  2. Select Add a vendor.
  3. In What are you adding, select OpenAI. proxium fills in the base URL and the models.
  4. Paste your OpenAI key into API key.
  5. Select Add OpenAI.

The vendor shows in the Vendors table, with set in the Key column. proxium stores the key encrypted. The console does not show the key again.

3. Make a virtual key​

Your application sends the virtual key to proxium. The virtual key is not your OpenAI key.

  1. Open Keys.
  2. Type a name for the key in Name this key, for example quickstart.
  3. In Tier, keep the default tier, trial.
  4. Select Create key. The dialog Your new key opens.
warning

Copy the key before you close the dialog. proxium keeps only a hash of the key, and it shows the key one time only.

  1. Select Copy.
  2. Select I have copied it.

If you lose the key, select Revoke in its row of the Keys table. Then make a new key.

Put the key in an environment variable in your shell:

export PROXIUM_KEY="paste-your-virtual-key-here"

4. Find a model id​

GET /v1/models lists the provider/model ids that your project can use. The OpenAI vendor of your project has the provider id t.<project>.openai, where <project> is the slug of your project.

Send the request, and put the id of gpt-4o-mini in an environment variable:

curl -s https://proxium.tech/v1/models \
-H "Authorization: Bearer $PROXIUM_KEY" | jq -r '.data[].id'

export PROXIUM_MODEL=$(curl -s https://proxium.tech/v1/models \
-H "Authorization: Bearer $PROXIUM_KEY" \
| jq -r '[.data[].id | select(endswith(".openai/gpt-4o-mini"))][0]')
echo "$PROXIUM_MODEL"

The last command prints an id such as t.<project>.openai/gpt-4o-mini. If it prints null, do step 2 again.

5. Send a chat call​

Send the call with one of the clients below. The base URL is https://proxium.tech/v1, and the API key is your virtual key.

curl https://proxium.tech/v1/chat/completions \
-H "Authorization: Bearer $PROXIUM_KEY" \
-H "Content-Type: application/json" \
-d "{\"model\": \"$PROXIUM_MODEL\", \"messages\": [{\"role\": \"user\", \"content\": \"Say hello in five words.\"}]}"

proxium sends the call to OpenAI with your OpenAI key, and returns the answer of OpenAI without change.

6. See the call in the console​

  1. Open Requests.
  2. Find your call in the Attempt log. The newest attempt is first.

The Model column shows the provider/model that answered. The Outcome column shows success. The Try column shows 1, because the first attempt answered.

Next steps​