Built from the official docs: openrouter.ai · Inkling 2 Small (free) - API Pricing & Benchmarks · checked 13 November 2026
Through OpenRouter
Get an API key
Create an OpenRouter account and generate an API key from your dashboard. Keep it in an environment variable named OPENROUTER_API_KEY so the examples below can read it.
export OPENROUTER_API_KEY=your_key_hereCall the model with curl
Send a POST request to the OpenRouter responses endpoint with the model slug thinkingmachines/inkling-2-small:free. The Content-Type and Authorization headers are required.
curl https://openrouter.ai/api/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -d '{ "model": "thinkingmachines/inkling-2-small:free", "input": "What is the meaning of life?" }'Or call it from Python
Post the same request body with the requests library. Replace the authorization value with your key or read it from the environment.
import requests import json response = requests.post( url="https://openrouter.ai/api/v1/responses", headers={ "Authorization": "Bearer <OPENROUTER_API_KEY>", }, data=json.dumps({ "model": "thinkingmachines/inkling-2-small:free", "input": "What is the meaning of life?" }) ) print(response.json())Or use the OpenAI SDK as a drop-in
OpenRouter's API is OpenAI-compatible, so point the OpenAI SDK at the OpenRouter base URL and pass the Inkling 2 Small slug. Install the openai package first, then run this.
from openai import OpenAI client = OpenAI( base_url="https://openrouter.ai/api/v1", api_key="<OPENROUTER_API_KEY>", ) response = client.responses.create( model="thinkingmachines/inkling-2-small:free", input="What is the meaning of life?" ) print(response.output_text)
Check it worked
You get a completed JSON response back from https://openrouter.ai/api/v1/responses containing generated output text, with no auth or error status in the body.