Change the base URL.Keep your code.
Venym speaks the OpenAI wire format, so the SDK you already use just works. Three lines change: the base URL, the key and the model id. Pick one and press run.
client = OpenAI(added: base_url="https://venym.io/v1",removed: api_key=os.environ["OPENAI_API_KEY"],added: api_key=os.environ["VENYM_API_KEY"],) r = client.chat.completions.create(removed: model="gpt-4o",added: model="venym/qwen-27b", messages=[{"role": "user", "content": "Say hello."}],)Everything it does.One page each.
Every card below is a real piece of the API, running. Click one for the full reference: parameters, responses and the sharp edges.
Chat completions
POST /v1/chat/completions. Messages in, a reply and a usage block out.
Streaming
Server-sent events, a final usage chunk, a sources event.
Tools
Function calling: the model asks, your code answers.
Search API
POST /v1/search. Titles, urls and snippets, billed per search.
# Tides
Tides are the regular rise and fall of the sea. They follow the Moon and the Sun, and most coasts see two highs a day.
## Spring and neap
The largest tides happen when the bodies line up: see spring tides. Look up a harbor in the tide tables before you sail.
## Reading the water
High water and low water are listed with their height. A rising tide is called the flood, a falling tide the ebb.
Scrape API
POST /v1/scrape. Any page as clean text, plus its links.
Errors
The OpenAI error shape, so SDK exception handling just works.
top up from $5.00
The one rule
The acceptable use policy still bans CSAM, sexual content about real people without consent, and using the API to attack systems. That is the whole list. See the terms.