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.
You need a ModelBridge account to follow this guide. Sign up at modelbridge.dev if you haven't already.
Step 1: Get your API key
- Sign in to your ModelBridge dashboard
- Navigate to API Keys in the sidebar
- Click Create API Key and give it a name
- Copy the key -- it starts with
mb_and is only shown once
Store your API key securely. If you lose it, you can revoke it and create a new one from the dashboard.
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:
- Browse available models to see pricing and capabilities
- Set up your IDE to use ModelBridge for coding
- Configure the Python SDK for advanced use cases like streaming and tool calling
- Create a team to share access and budgets with your organization