{"slug": "call-mark-1x-27b-with-the-openai-sdk-in-two-lines", "title": "Call Mark 1x-27B with the OpenAI SDK in two lines", "summary": "Saanora released Mark 1x-27B, a 27B-parameter model scoring 84.7 on GPQA Diamond with a 262K-token context window, tool calling, image input and adjustable reasoning effort. The model speaks the OpenAI Chat Completions API, so existing OpenAI SDK code can switch by changing only the base URL and model name, at $0.10 per 1M input tokens and $0.60 per 1M output tokens. Reasoning traces are returned separately in choices[0].message.reasoning and billed as output tokens, and idle requests may return a 503 model_warming_up with a Retry-After header that are not charged.", "body_md": "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.\n\nSign 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:\n\n```\nexport SAANORA_API_KEY=\"sk_sa_...\"\npython\n# mark.py: pip install openai, then python mark.py\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"https://api.saanora.com/v1\", api_key=os.environ[\"SAANORA_API_KEY\"])\nr = client.chat.completions.create(\n    model=\"mark-1x-27b\",\n    messages=[{\"role\": \"user\", \"content\": \"How many prime numbers are there below 100?\"}],\n)\nprint(r.choices[0].message.content)\n// mark.mjs: npm install openai, then node mark.mjs (Node.js 18 or later)\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({ baseURL: \"https://api.saanora.com/v1\", apiKey: process.env.SAANORA_API_KEY });\nconst r = await client.chat.completions.create({\n  model: \"mark-1x-27b\",\n  messages: [{ role: \"user\", content: \"How many prime numbers are there below 100?\" }],\n});\nconsole.log(r.choices[0].message.content);\ncurl https://api.saanora.com/v1/chat/completions \\\n  -H \"Authorization: Bearer $SAANORA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"mark-1x-27b\", \"messages\": [{\"role\": \"user\", \"content\": \"How many prime numbers are there below 100?\"}]}'\n```\n\nMark 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`.\n\n```\nr = client.chat.completions.create(\n    model=\"mark-1x-27b\",\n    messages=[{\"role\": \"user\", \"content\": \"Is 1,000,003 prime?\"}],\n    reasoning_effort=\"low\",\n)\nprint(r.choices[0].message.content)\nstream = client.chat.completions.create(\n    model=\"mark-1x-27b\",\n    messages=[{\"role\": \"user\", \"content\": \"Explain compound interest with an example.\"}],\n    stream=True,\n)\nfor chunk in stream:\n    if chunk.choices and chunk.choices[0].delta.content:\n        print(chunk.choices[0].delta.content, end=\"\", flush=True)\n```\n\n$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.\n\nOne 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.\n\nDocs: [api.saanora.com](https://api.saanora.com). I'd love to hear what you build with it.", "url": "https://wpnews.pro/news/call-mark-1x-27b-with-the-openai-sdk-in-two-lines", "canonical_source": "https://dev.to/saathwik/call-mark-1x-27b-with-the-openai-sdk-in-two-lines-39bg", "published_at": "2026-11-23 17:04:29+00:00", "updated_at": "2026-11-23 17:12:42.496489+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-products", "ai-tools", "generative-ai"], "entities": ["Saanora", "Mark 1x-27B", "OpenAI", "GPQA Diamond"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/call-mark-1x-27b-with-the-openai-sdk-in-two-lines", "markdown": "https://wpnews.pro/news/call-mark-1x-27b-with-the-openai-sdk-in-two-lines.md", "text": "https://wpnews.pro/news/call-mark-1x-27b-with-the-openai-sdk-in-two-lines.txt", "jsonld": "https://wpnews.pro/news/call-mark-1x-27b-with-the-openai-sdk-in-two-lines.jsonld"}}