OpenAI SDKs
The official OpenAI Python and Node libraries. Set a base URL and a key; the rest of your code stays the same.
Settings
Base URL
https://uncensoredllm.xyz/v1
API key
your vk-... key
Model
uncensoredllm-1
Steps
- Install the library:
pip install openaifor Python,npm install openaifor Node. - Create the client with
base_url(Python) orbaseURL(Node) and your key. - Pass the model id above as
modelon each call.
script.py
from openai import OpenAI client = OpenAI(base_url="https://uncensoredllm.xyz/v1", api_key="vk-...")The Python library also reads the OPENAI_BASE_URL environment variable, next to OPENAI_API_KEY, so unmodified Python code can switch by environment alone.
Shell
export OPENAI_BASE_URL="https://uncensoredllm.xyz/v1"export OPENAI_API_KEY="vk-..."Check that it works
Send one short message and read the reply. The quickstart has a complete first request in curl, Python and Node.
When something does not work
401The key was not sent or is wrong. See errors.404 model_not_foundThe model id is wrong. Use the id above, or callGET /v1/models.404 unknown_urlThe base URL is not the one above, or a call went to an endpoint we do not serve, such as embeddings.