Built from the official docs: openrouter.ai · Inkling 2 Mini - API Pricing & Benchmarks · checked 27 November 2026
Through OpenRouter
Get an API key
Sign up at OpenRouter and create a key. Keep it secret and supply it wherever a key is required below.
Export your key
Store the key in an environment variable so the commands below can read it.
export OPENROUTER_API_KEY=<your-key>Call the model with curl
Send a request to the OpenRouter responses endpoint using the model slug thinkingmachines/inkling-2-mini.
curl https://openrouter.ai/api/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -d '{ "model": "thinkingmachines/inkling-2-mini", "input": "What is the meaning of life?" }'Or call it from Python
Install the OpenRouter Python SDK, then send a request with the same model slug.
pip install openrouterRun the Python request
The SDK reads your key from the environment and sends the prompt to the model.
from openrouter import OpenRouter import os with OpenRouter(api_key=os.getenv("OPENROUTER_API_KEY")) as client: response = client.responses.send( model="thinkingmachines/inkling-2-mini", input="What is the meaning of life?", ) if response.status != "completed": message = response.error.message if response.error else f"Response ended as {response.status}" raise RuntimeError(message) message = next(item for item in response.output if item.type == "message") print(next(part.text for part in message.content if part.type == "output_text"))
Check it worked
The response JSON has "status": "completed" and an output message whose content includes an "output_text" with the model's reply; the Python script prints that text.