Skip to main content

Common Error

When you see an error like this:
This usually isn’t a problem with your API Key itself, but rather a Base URL misconfiguration.
Most common mistake: Using GravitexAI’s Key but the request URL still points to OpenAI’s https://api.openai.com

What is Base URL?

Base URL is the target server address for API requests. Different providers use different Base URLs.

Base URL and API Key Must Match

Key principle: Use the provider’s Base URL that matches your API Key

Correct Configuration

Method 2: Environment Variables

Supported URL Formats

Troubleshooting

Possible causes:
  1. Multiple configurations: Check config files, env vars, code initialization
  2. Proxy or middleware: Some tools may redirect requests
  3. Cache issues: Restart program or clear cache
  4. Typos: Verify the URL spelling
Check in GravitexAI console:
  1. Login to GravitexAI
  2. Go to “Tokens” page
  3. Check if Key status is “Enabled”
  4. Confirm account balance is sufficient
Most tools have “Custom API” options:
  • API URL / Base URL: https://api.gravitex.ai/v1
  • API Key: Copy from GravitexAI console
  • Model name: Refer to model list

Wrong vs Correct Examples

❌ Wrong Configuration

Result: OpenAI server rejects GravitexAI’s Key

✅ Correct Configuration

Result: Request successfully sent to GravitexAI

Quick Test

Verify configuration with cURL:
Expected result: Returns available models list
If you get an error, check:
  1. API Key copied correctly (no extra spaces)
  2. Network connection is working
  3. Account balance is sufficient
Remember: Match the Key to its URL. GravitexAI Key uses https://api.gravitex.ai/v1