# Call Mark 1x-27B with the OpenAI SDK in two lines

> Source: <https://dev.to/saathwik/call-mark-1x-27b-with-the-openai-sdk-in-two-lines-39bg>
> Published: 2026-11-23 17:04:29+00:00

**Key takeaway:** Mark 1x-27B is a drop-in for the OpenAI SDK via base_url https://api.saanora.com/v1 and model name mark-1x-27b, with reasoning_effort low/medium/high and reasoning billed as output tokens at $0.60 per 1M.

Mark 1x-27B is Saanora's most capable model: 84.7 on GPQA Diamond, a 262K-token context window, tool calling, image input and adjustable reasoning effort. It speaks the OpenAI Chat Completions API, so if your code already uses the OpenAI SDK, switching is two lines: the base URL and the model name.

Sign up at [api.saanora.com](https://api.saanora.com). Once your email is verified you get $0.20 of free credit, enough to try everything below. Open **API keys**, create a key and export it:

```
export SAANORA_API_KEY="sk_sa_..."
python
# mark.py: pip install openai, then python mark.py
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.saanora.com/v1", api_key=os.environ["SAANORA_API_KEY"])
r = client.chat.completions.create(
    model="mark-1x-27b",
    messages=[{"role": "user", "content": "How many prime numbers are there below 100?"}],
)
print(r.choices[0].message.content)
// mark.mjs: npm install openai, then node mark.mjs (Node.js 18 or later)
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.saanora.com/v1", apiKey: process.env.SAANORA_API_KEY });
const r = await client.chat.completions.create({
  model: "mark-1x-27b",
  messages: [{ role: "user", content: "How many prime numbers are there below 100?" }],
});
console.log(r.choices[0].message.content);
curl https://api.saanora.com/v1/chat/completions \
  -H "Authorization: Bearer $SAANORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "mark-1x-27b", "messages": [{"role": "user", "content": "How many prime numbers are there below 100?"}]}'
```

Mark thinks before it answers. The answer is in `choices[0].message.content`; the thinking comes back separately in `choices[0].message.reasoning` (billed as output tokens). Set how hard it thinks with `reasoning_effort`: `low`, `medium` or `high`.

```
r = client.chat.completions.create(
    model="mark-1x-27b",
    messages=[{"role": "user", "content": "Is 1,000,003 prime?"}],
    reasoning_effort="low",
)
print(r.choices[0].message.content)
stream = client.chat.completions.create(
    model="mark-1x-27b",
    messages=[{"role": "user", "content": "Explain compound interest with an example."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
```

$0.10 per 1M input tokens and $0.60 per 1M output tokens, paid from prepaid credit. Top-ups start at $5. One key and one balance work for every model on the API.

One note: when Mark has been quiet for a while, the first request can come back as `503 model_warming_up` with a `Retry-After` header while it starts. Retry after that time; those requests aren't charged.

Docs: [api.saanora.com](https://api.saanora.com). I'd love to hear what you build with it.
