Skip to content
Docs/Integrations/OpenAI SDKs

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

  1. Install the library: pip install openai for Python, npm install openai for Node.
  2. Create the client with base_url (Python) or baseURL (Node) and your key.
  3. Pass the model id above as model on each call.
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

  • 401 The key was not sent or is wrong. See errors.
  • 404 model_not_found The model id is wrong. Use the id above, or call GET /v1/models.
  • 404 unknown_url The base URL is not the one above, or a call went to an endpoint we do not serve, such as embeddings.