Skip to main content

Quickstart

In this quickstart, you send one request from your computer to a model, through Proxium. It takes five steps, in the console at proxium.tech/app and in your terminal.

You need:

  • A Proxium account. Sign in at proxium.tech/app.
  • An API key from a model vendor, such as OpenAI, Anthropic, Groq or Mistral. Providers lists every vendor.
  • curl and jq in your terminal.

1. Add a vendor​

Proxium calls the vendor with your vendor key. To add the vendor, open Providers in the console and select Add a vendor.

  1. In What are you adding, select your vendor.
  2. Paste your vendor key into API key.
  3. Select Add and the name of the vendor, for example Add Groq.

The vendor shows in the Vendors table, with its list of models.

tip

If the console shows One thing first after you sign in, type a name in Project name and select Create project. Then add the vendor.

2. Create an endpoint​

An endpoint gives your app a base URL and a virtual key. Your vendor key stays in Proxium.

warning

The console shows the key one time only. Copy it before you close the panel.

  1. Open Endpoints, and select New endpoint.
  2. In Name it after the app, type quickstart.
  3. Select Create endpoint.
  4. In the panel quickstart is live, select the copy button of the key.
  5. Save the key in your terminal:
Terminal
export PROXIUM_KEY="paste-your-virtual-key-here"

3. Pick a model​

Ask Proxium for the models that your project can use:

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

You see one line for each model of your vendor. A model id is the vendor of your project and a model name:

Output
t.acme.groq/<model-a>
t.acme.groq/<model-b>

acme is your project. Save one id in your terminal:

Terminal
export PROXIUM_MODEL="t.acme.groq/<model-a>"
tip

The console shows the same models on Providers, in the row of your vendor. If the list is empty, do step 1 again.

4. Send a request​

Send the request to https://proxium.tech/v1, with your virtual key:

Terminal
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.\"}]}"

The Python and Node scripts print the reply of the model. curl prints the whole answer, which looks like this (shortened):

Answer
{
"object": "chat.completion",
"model": "<model-a>",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello there, nice to meet!" },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 14, "completion_tokens": 7, "total_tokens": 21 }
}

The reply is in choices[0].message.content, and the token counts are in usage. Proxium prices the call from these counts.

5. See the request in the console​

The console records each request. To see yours, open Requests in the console. Your request is the first row of the Attempt log:

WhenModelAsked forTryOutcomeTook
…t.acme.<vendor>/<model>t.acme.<vendor>/<model>1success…
ColumnWhat it tells you
ModelThe model that answered
Asked forThe model or tier in your request
TryThe number of the vendor call. 2 or more means that a call failed, and Proxium called the same model again or the next model
Outcomesuccess, error, timeout or circuit_open

When calls come from more than one app, the log also has an App column. Your app sets its name with the x-proxium-source header.

The cost of the request shows on Overview, in Spent.

Next steps​