On this page

Quickstart

This page shows how to send your first request to a shared model.

Before you start#

You must have a Nuemetrix account and an organization. The sign-up page makes the organization for you.

Procedure#

  1. Sign in to the dashboard.
  2. Go to API keys.
  3. Select Create key.
  4. Type a name, for example quickstart.
  5. Select the scope inference and select Create.
  6. Copy the key. The dashboard shows the key only one time.
  7. Set two environment variables in your shell.
shell
export EMBER_API_URL="<the API URL of your Nuemetrix installation>"
export EMBER_API_KEY="<your key>"
  1. Send a request. Choose your language.
curl "$EMBER_API_URL/v1/chat/completions" \
  -H "Authorization: Bearer $EMBER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model ID>",
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ],
    "temperature": 0.7,
    "max_tokens": 256
  }'

To find the model IDs, send GET /v1/models with the same key.

Use an SDK#

The Python and TypeScript samples use the OpenAI SDK. Change only the base URL and the API key. The Rust sample uses reqwest. See SDK clients for more.