Quickstart

Get up and running with ModelBridge in under 5 minutes. This guide covers creating an API key and making your first request to any supported AI model.

Step 1: Get your API key

  1. Sign in to your ModelBridge dashboard
  2. Navigate to API Keys in the sidebar
  3. Click Create API Key and give it a name
  4. Copy the key -- it starts with mb_ and is only shown once

Step 2: Set your environment variables

Add your ModelBridge credentials to your shell environment. If you're signed in, select your API key below to auto-fill:

export OPENAI_BASE_URL="https://api.modelbridge.dev/v1"
export OPENAI_API_KEY="mb_live_your_key_here"

Most OpenAI-compatible tools and SDKs read these variables automatically.

Step 3: Make your first request

Choose your model and language, then copy the generated code:

curl https://api.modelbridge.dev/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer mb_live_your_key_here" \
  -d '{
    "model": "",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello! What can you help me with?"}
    ]
  }'

Step 4: List available models

Check which models you have access to:

curl

curl https://api.modelbridge.dev/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"

What's next?

You're all set. Here are some next steps:

Was this page helpful?