Skip to main content
RefillAPI speaks the OpenAI API, so the official SDKs work as they are. Change two things: the base URL and the API key.
Set the key in your shell first: export REFILLAPI_KEY='sk-...'.

Other tools

Any tool with a custom “OpenAI-compatible” provider works the same way: base URL https://refillapi.com/v1, your API key, and an exact model ID. Many frameworks (LangChain, LlamaIndex, Vercel AI SDK, LiteLLM) read the OPENAI_BASE_URL and OPENAI_API_KEY environment variables.

Non-OpenAI fields

Model-specific fields — for example metadata on video requests or images on image requests — are passed with extra_body in Python and as extra properties in Node.js:
Keep the key on the server. Do not ship it in browser or mobile app code.