CUSTOM ENDPOINTS, SMALL FIRST REQUESTS
Get your API
setup right.
Turn a custom OpenAI-compatible base URL into a bounded Chat Completions example. Check model access before your first generation.
FOLLOW THE REQUEST
Three checks before you debug the prompt.
- AccessGET
/v1/models. Is the exact model ID returned for your key? - ProtocolConfirm Chat Completions support in the provider's model catalogue. Listing a model does not prove it supports every endpoint.
- Availability & creditCheck current model status and prepaid balance. A model list is not an uptime test.
WHEN A REQUEST FAILS
Read the error before retrying.
These are the documented CheapClankers signals. Other providers may use different status codes; read their returned error and documentation.
Check the key.
Use the key for the intended service, confirm it has not been revoked and keep it in a server-side environment variable.
Keep the x-request-id header for support. The SDK examples disable automatic retries so a failed first request stays deliberate.
Continue from a small working request.
CheapClankers maintains this independent tool and the companion fixtures. The generated examples use the official OpenAI SDKs; this tool is not endorsed by OpenAI. Fixture checks are local integration evidence, not proof of live model availability.
Use Node.js 22+ with openai@7.60.0, or Python 3.9+ with openai==2.24.0, matching the companion fixture versions. The cURL example uses Bash/zsh and requires cURL with --fail-with-body support. Never place server-side API keys in browser JavaScript.