An API key identifies your account, while a Base URL tells the tool where to send API requests. For OpenAI-compatible APIs, the Base URL usually points to an API root such as https://api.rutaapi.com/v1, not the website homepage, dashboard, registration page or a full chat completions endpoint. The API key and Base URL must come from the same provider.
Before you read this guide
This guide explains the basic concepts of API keys, Base URLs, endpoints and OpenAI-compatible APIs. Read it before configuring Cursor, Claude Code, Codex CLI, Cline, Continue, Open WebUI or any other tool that asks for these fields.
No technical background is assumed beyond familiarity with copying text and running terminal commands.
What an API key is An API key is a secret string of characters that identifies your account when you make a request. It is generated by the provider and acts like a password. Never share it in screenshots or public posts. If it is exposed, rotate it immediately from the provider dashboard.
What a Base URL is A Base URL is the root address of the API gateway. It tells the client where to send requests. The correct RutaAPI Base URL is <strong>https://api.rutaapi.com/v1</strong> — it includes /v1 and points to the API root, not the dashboard or marketing site.
What an endpoint is An endpoint is a specific URL path on top of the Base URL. For example, https://api.rutaapi.com/v1/chat/completions is an endpoint built on the Base URL https://api.rutaapi.com/v1. The Base URL is the root; the endpoint is a specific path under it.
What /v1 means The /v1 is the OpenAI API version prefix. OpenAI-compatible APIs use /v1 to indicate they follow the OpenAI API structure. The Base URL should end in /v1. Omitting /v1 means you are pointing to the wrong endpoint and will get 404 errors.
What OpenAI-compatible means OpenAI-compatible means an API that uses the same request and response format as OpenAI — the same JSON structure, field names and endpoint paths. This lets clients written for OpenAI connect to other providers without code changes, as long as they use the same format.
RutaAPI disclaimer RutaAPI is an OpenAI-compatible API gateway. It is not an official OpenAI, Anthropic, Google or Microsoft service. Model availability and rates depend on your account configuration and upstream providers.
How to start with RutaAPI
Step 1 — Get your API key and Base URL
Create a RutaAPI account and API key. The correct Base URL is https://api.rutaapi.com/v1.
The API key and Base URL must come from the same platform. Do not mix a key from one provider with a Base URL from another.
Step 2 — Verify /v1/models
Before sending any request, confirm the key works:
A 200 response with a model list means the key and Base URL are correct. A 401 means the key is wrong or sent to the wrong Base URL.
curl https://api.rutaapi.com/v1/models \
-H "Authorization: Bearer YOUR_RUTAAPI_KEY"Step 3 — Send a small test request
Confirm end-to-end connectivity with a single, simple request:
Use one of the model id values from /v1/models as MODEL_NAME. Do not guess — identifiers differ between providers.
curl https://api.rutaapi.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_RUTAAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"messages": [
{"role": "user", "content": "Hello from RutaAPI"}
]
}'Who this guide is for
This guide is for anyone who has been asked for an API key, Base URL or model name by an AI tool and did not know what to fill in.
If you already know what an API key and Base URL are, jump to the correct examples section.
Who should not use this guide alone
- Users who already have a working API key and Base URL — use the RutaAPI Docs directly.
- Users who only want pricing information — see Pricing instead.
Testing your key and Base URL
Before configuring any AI tool, test the API key and Base URL from the terminal first. This rules out configuration errors before you touch any tool settings.
If the terminal request succeeds, the tool configuration should work too. If it fails, fix the terminal request first — terminal errors are easier to diagnose than tool-specific error messages.
How to pick a model name
Model names are returned by the GET /v1/models endpoint. Copy one of the model id values from the response and use it wherever the tool asks for a model name.
Model availability is per-account. If a model name is not in your /v1/models response, it is not active in your account.
Common errors
401 Unauthorized
The API key is missing, incorrect, or sent to the wrong Base URL. Verify the key and Base URL both come from the same platform.
403 Forbidden
The key exists but lacks permission. Check credits and model access in your account.
404 Model not found
The model name is not in your account. Run GET /v1/models and copy a returned model id.
429 Too Many Requests
Rate or concurrency limit. Lower the number of concurrent requests and retry.
503 Service Unavailable
The provider route is temporarily unavailable. Try a short request or contact support if persistent.
Tools that ask for these fields
- Cursor and Cursor Composer
- Claude Code
- Codex CLI
- Cline
- Continue
- Open WebUI
- Any tool that supports custom OpenAI-compatible providers
When RutaAPI may help
- You need an OpenAI-compatible Base URL and API key in one place
- You want prepaid credits instead of a monthly contract
- You want to verify available models with /v1/models before configuring any tool
- You want setup docs for Cursor, Claude Code, Codex CLI and similar tools
- You want usage visibility — requests made, models used, credits remaining
When RutaAPI may not help
- You need a direct contract with a specific model provider
- You require guaranteed availability of one exact model with no routing
- You need an official provider-only enterprise contract
Related guides
- Unified Base URL for Claude Code, Codex CLI and Cursor
- Cursor custom API setup guide
- Codex CLI setup with RutaAPI
- Claude Code setup with RutaAPI
- Codex CLI invalid_api_key troubleshooting
- Claude Code timeout troubleshooting
- Available models
- Pricing and credit packs
FAQ
What is an API key?
An API key is a secret string that identifies your account. It is generated by the provider and must be kept private. If exposed, rotate it immediately from the provider dashboard.
What is a Base URL?
A Base URL is the root address of the API gateway. It tells your client where to send requests. For RutaAPI it is https://api.rutaapi.com/v1 — always include /v1.
Is a Base URL the same as an endpoint?
No. The Base URL is the root address; an endpoint is a specific path built on top of it. For example, https://api.rutaapi.com/v1/chat/completions is an endpoint. The Base URL ends in /v1, not /chat/completions.
Should the Base URL include /v1?
Yes. The /v1 path is the OpenAI-compatible API root. Without it you are pointing to the wrong endpoint and will get 404 errors.
Can I use the website URL as the Base URL?
No. https://rutaapi.com is the marketing homepage. It is not the API root. Using it as the Base URL will result in errors. Always use https://api.rutaapi.com/v1.
Can I use the dashboard URL as the Base URL?
No. https://app.rutaapi.com is for account management, not the API. Using it as the Base URL will result in errors. Always use https://api.rutaapi.com/v1.
Can one API key work with another provider's Base URL?
No. An API key only works with the Base URL of the provider that issued it. Mixing a key from one provider with a Base URL from another results in a 401 error.
What is /v1/models?
/v1/models is a GET request that returns a list of models available in your account. It is the standard way to verify an API key and discover which models you can access. A 200 response means the key is valid; a 401 means it is not.
How do I choose the model name?
Run GET /v1/models with your API key and use one of the model id values from the response as the model name. Do not guess — identifiers differ between providers.
What does 401 mean?
HTTP 401 means the API key is missing, incorrect or sent to the wrong Base URL. Confirm the key and Base URL both come from the same provider. Run /v1/models to verify the key.
What does 403 mean?
HTTP 403 means the key exists but lacks permission. Check that your account has enough prepaid credits and that the model is enabled for your account.
What does 404 mean?
HTTP 404 means the model name is not recognised. Run /v1/models and use one of the returned model id values as the model name. Do not guess.
Is RutaAPI an official OpenAI service?
No. RutaAPI is an OpenAI-compatible API gateway operated by BDR FIDUCIARY LLC. It is not an official service of OpenAI, Anthropic, Google or Microsoft.
Should I share my API key in screenshots?
No. Never share your full API key in screenshots, forum posts or any public or shared channel. If exposed, rotate it immediately from the dashboard.