When using Prime Inference with a team account, you must explicitly pass your team ID to charge against team credits instead of your personal account.
Finding Your Team ID
You can find your team ID in two ways:
Via CLI:
Via Web:
Visit your Team Profile page
Setting Team ID
The prime config set-team-id
command only affects CLI operations. For direct API usage (OpenAI client or HTTP requests), you must explicitly pass the X-Prime-Team-ID
header.
CLI Usage
When using the Prime CLI, configure your team ID once:
# Set team ID for CLI operations
prime config set-team-id
# Verify configuration
prime config view
# Now CLI commands use team account
prime inference models
prime env eval gsm8k -m meta-llama/llama-3.1-70b-instruct -n 25
API Usage
For direct API access, include the X-Prime-Team-ID
header in your requests.
Set the header once when creating the client:
import openai
import os
client = openai.OpenAI(
api_key=os.environ.get("PRIME_API_KEY"),
base_url="https://api.pinference.ai/api/v1",
default_headers={
"X-Prime-Team-ID": "your-team-id-here"
}
)
# All requests will now use team account
response = client.chat.completions.create(
model="meta-llama/llama-3.1-70b-instruct",
messages=[{"role": "user", "content": "Hello"}]
)
Option 2: Set Per Request
For occasional team usage or switching between accounts:
# Create client without team ID
client = openai.OpenAI(
api_key=os.environ.get("PRIME_API_KEY"),
base_url="https://api.pinference.ai/api/v1"
)
# Add team ID to specific requests
response = client.chat.completions.create(
model="meta-llama/llama-3.1-70b-instruct",
messages=[{"role": "user", "content": "Hello"}],
extra_headers={
"X-Prime-Team-ID": "your-team-id-here"
}
)