Skip to content

Inkling 256K

Text Generation • thinkingmachines

View as MarkdownAgent setup

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

The 256K-context variant of Inkling, Thinking Machines' open-weights hybrid reasoning MoE model. Same hybrid reasoning, tool-use, and streaming support as the base model, with an extended context window for longer conversations and documents. Currently intended for low-traffic testing and internal use rather than high-throughput production deployments.

Model Info
Context Window ↗262,144 tokens
More informationlink ↗
Request formatsAnthropic Messages
Pricing
  • Input (per 1M tokens)$3.74
  • Output (per 1M tokens)$9.36
  • Cached input (per 1M tokens)$0.748
  • Cache creation (per 1M tokens)$3.74

Usage

const response = await env.AI.run(
  'thinkingmachines/inkling-256k',
  { max_tokens: 512, messages: [{ content: 'The capital of France is', role: 'user' }] },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/messages \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "thinkingmachines/inkling-256k",
  "max_tokens": 512,
  "messages": [
    {
      "content": "The capital of France is",
      "role": "user"
    }
  ]
}'
The capital of France is **Paris**.
{
  "id": "msg_f3f0874570144f29add4272d4f07491d",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "thinking",
      "thinking": "The user is asking \"The capital of France is\". This is a straightforward factual question. The capital of France is Paris. I should provide the answer clearly and concisely.",
      "signature": ""
    },
    {
      "type": "text",
      "text": "The capital of France is **Paris**."
    }
  ],
  "model": "thinkingmachines/Inkling:peft:262144",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 52,
    "cache_creation_input_tokens": 19,
    "cache_read_input_tokens": 0
  }
}

Examples

Tool Use — Tool use round-trip: the model requests a tool call, then answers using the tool_result supplied in a follow-up user message
const response = await env.AI.run(
  'thinkingmachines/inkling-256k',
  {
    max_tokens: 1024,
    messages: [
      { content: "What's the weather in Paris?", role: 'user' },
      {
        content: [
          {
            id: 'toolu_01A1x1x1x1x1x1x1x1x1x1x1',
            input: { city: 'Paris' },
            name: 'get_weather',
            type: 'tool_use',
          },
        ],
        role: 'assistant',
      },
      {
        content: [
          {
            content: 'Sunny, 22°C',
            tool_use_id: 'toolu_01A1x1x1x1x1x1x1x1x1x1x1',
            type: 'tool_result',
          },
        ],
        role: 'user',
      },
    ],
    tools: [
      {
        description: 'Get the current weather for a city.',
        input_schema: {
          properties: { city: { type: 'string' } },
          required: ['city'],
          type: 'object',
        },
        name: 'get_weather',
      },
    ],
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/messages \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "thinkingmachines/inkling-256k",
  "max_tokens": 1024,
  "messages": [
    {
      "content": "What'\''s the weather in Paris?",
      "role": "user"
    },
    {
      "content": [
        {
          "id": "toolu_01A1x1x1x1x1x1x1x1x1x1x1",
          "input": {
            "city": "Paris"
          },
          "name": "get_weather",
          "type": "tool_use"
        }
      ],
      "role": "assistant"
    },
    {
      "content": [
        {
          "content": "Sunny, 22°C",
          "tool_use_id": "toolu_01A1x1x1x1x1x1x1x1x1x1x1",
          "type": "tool_result"
        }
      ],
      "role": "user"
    }
  ],
  "tools": [
    {
      "description": "Get the current weather for a city.",
      "input_schema": {
        "properties": {
          "city": {
            "type": "string"
          }
        },
        "required": [
          "city"
        ],
        "type": "object"
      },
      "name": "get_weather"
    }
  ]
}'
The weather in Paris is sunny with a temperature of 22°C.
{
  "id": "msg_5711f240c8da46eeb462f8900281d087",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "thinking",
      "thinking": "The user asked for the weather in Paris. The function returned \"Sunny, 22°C\". I should provide a clear, concise answer.",
      "signature": ""
    },
    {
      "type": "text",
      "text": "The weather in Paris is sunny with a temperature of 22°C."
    }
  ],
  "model": "thinkingmachines/Inkling:peft:262144",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 49,
    "cache_creation_input_tokens": 95,
    "cache_read_input_tokens": 0
  }
}

Parameters

max_tokens
numberrequiredexclusiveMinimum: 0
temperature
numberminimum: 0maximum: 1
top_p
numberminimum: 0maximum: 1
top_k
numberexclusiveMinimum: 0
stream
boolean
id
string
type
stringconst: message
role
stringconst: assistant
model
string
stop_reason
string

API Schemas (Raw)

Input
Output

Was this helpful?