cheapaimodelSearch

API key checker

Test an API key and base URL for any OpenAI-compatible API, right from your browser.

Your key goes only from this browser to the URL above. We never see or store it.

About this tool

When an AI tool can’t connect to a model API, the cause is usually one of a few things: a base URL with a missing or extra path, a key that belongs to a different provider, a model ID that doesn’t exist, or a browser that blocks the request. This checker sends the same requests your tool would, from your browser, and tells you which one it is. It works with any API that follows the OpenAI format, not only cheapaimodel.

How the check works

  1. Tidy the base URL

    Before anything is sent, the address is cleaned up with the rules shown below, so a small typo doesn’t hide the real problem. Hosts known to need /v1 (OpenAI and cheapaimodel) get it added; for other hosts we only point it out, because some providers work without it.

    Base URL fixes

    • https://api.example.com/v1Added https://.
    • http://localhost:11434/v1Added http://.
    • https://api.example.com/v1Changed http:// to https://. A page served over HTTPS can’t call plain HTTP; if your server only speaks HTTP, test it with curl.
    • https://api.example.com/v1/chat/completionsRemoved /chat/completions from the end: your tool adds it to every request.
    • https://api.example.com//v1/Removed extra slashes.
    • https://api.example.com/v1/v1/v1 appeared twice; kept one.
    • https://api.example.com/v1?key=abcRemoved the query string or # fragment.
    • https://api.openai.com/v1Added /v1, which this API requires.
    • https://apiconsole.cheapaimodel.ai/v1That is our website, not the API. Switched to the API address.
  2. List models

    Sends GET <base_url>/models with your key in the Authorization header. It costs nothing and shows that the address and the key work together. The request gives up after 15 seconds.

  3. Send a test message (optional)

    Only when you press the button: one streamed chat completion that asks “Reply with OK.” with max_tokens 16. First token is the time from sending until the first streamed chunk arrives; the total runs until the stream ends. If the model rejects max_tokens, it is sent once more with max_completion_tokens. The request gives up after 30 seconds.

  4. Read the answer

    An error code in the response wins over the HTTP status: model_not_found means a wrong model ID, insufficient_quota means no credit. Otherwise the status decides: 401 is the key, 403 is permission or balance, 404 is the path, 429 is a rate limit and 5xx is the provider. A plain-text 404 usually means a missing /v1, and an HTML page means a website address instead of the API.

  5. Tell CORS from a dead server

    If the browser won’t show a response, the page sends one more request to the same address in no-cors mode, without your key. If the server answers, it is up but blocks web pages (CORS), and the curl command is the way to test it. If it doesn’t answer, it can’t be reached from your network.

  6. Where your key goes

    Requests go straight from this page to the base URL you entered. The key lives only in this page’s memory: it isn’t sent to cheapaimodel, saved in the browser or put in the address bar, and it is gone when you close the tab. The curl command masks it unless you choose to show it.

Common errors and fixes

  • The key was rejected (401)

    The server doesn’t accept this API key. It may be mistyped, revoked or expired, or it may belong to a different provider than this base URL. Copy the key again without spaces and check that it is for this provider.

  • Access denied (403)

    The key is valid but not allowed to make this call: the model, your IP address or the account may be restricted, or the balance may be too low.

  • Not an API path (404)

    The server answered with a plain-text 404 instead of an API error. Most often the base URL is missing /v1.

  • Model not found

    No model with this ID is available to this key. Model IDs must match exactly: copy one from the list above or from the provider’s model page.

  • Rate limited (429)

    Too many requests, or this key has hit the provider’s limit. Wait a moment and try again; if it keeps happening, check the provider’s rate limits.

  • Blocked by the browser (CORS)

    The server is reachable, but it doesn’t let web pages read its responses. This says nothing about your key: run the curl command below in a terminal to see the real answer.

  • Timed out

    No answer within 15 seconds. The server may be overloaded, or the address may point to something that never answers.