POST/v1/messagesUpdated

Messages API for abliterated models

POST /v1/messages is Anthropic's format, the one Claude Code and the Anthropic SDKs speak. It reaches the same models, prices and limits as Chat Completions.

https://api.silkcompute.com
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.silkcompute.com",
    api_key=os.environ["SILK_API_KEY"],
)

message = client.messages.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    max_tokens=2048,
    messages=[{"role": "user", "content": "What is a mutex?"}],
)
print(message.content[0].text)

Example response

{
  "type": "message",
  "role": "assistant",
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "content": [
    {"type": "text", "text": "A lock only one thread can hold at a time."}
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 16,
    "output_tokens": 21,
    "cache_read_input_tokens": 0
  }
}
import Anthropic from '@anthropic-ai/sdk'

const client = new Anthropic({
  baseURL: 'https://api.silkcompute.com',
  apiKey: process.env.SILK_API_KEY,
})

const message = await client.messages.create({
  model: 'deepseek-v4.1-flash-1017-uncensored',
  max_tokens: 2048,
  messages: [{ role: 'user', content: 'What is a mutex?' }],
})
console.log(message.content)

Example response

{
  "type": "message",
  "role": "assistant",
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "content": [
    {"type": "text", "text": "A lock only one thread can hold at a time."}
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 16,
    "output_tokens": 21,
    "cache_read_input_tokens": 0
  }
}
curl https://api.silkcompute.com/v1/messages \
  -H "x-api-key: $SILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017-uncensored",
    "max_tokens": 2048,
    "messages": [
      {"role": "user", "content": "What is a mutex?"}
    ]
  }'

Example response

{
  "type": "message",
  "role": "assistant",
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "content": [
    {"type": "text", "text": "A lock only one thread can hold at a time."}
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 16,
    "output_tokens": 21,
    "cache_read_input_tokens": 0
  }
}
message = client.messages.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    max_tokens=16000,
    thinking={"type": "enabled", "budget_tokens": 8192},
    output_config={"effort": "high"},
    messages=[{"role": "user", "content": "Find the race condition in this function."}],
)
const message = await client.messages.create({
  model: 'deepseek-v4.1-flash-1017-uncensored',
  max_tokens: 16000,
  thinking: { type: 'enabled', budget_tokens: 8192 },
  output_config: { effort: 'high' },
  messages: [{ role: 'user', content: 'Find the race condition in this function.' }],
})
curl https://api.silkcompute.com/v1/messages \
  -H "x-api-key: $SILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017-uncensored",
    "max_tokens": 16000,
    "thinking": {"type": "enabled", "budget_tokens": 8192},
    "output_config": {"effort": "high"},
    "messages": [
      {"role": "user", "content": "Find the race condition in this function."}
    ]
  }'

How it works

ThinkingOnly when thinking is onThe thinking comes back in thinking blocks. output_config.effort or budget_tokens sets how much.
What differsNo video, PDFs or server toolsVideo returns 400. PDFs, token counting and server tools such as web search are not available.
Caching and errorsAutomatic cachingNo cache_control markers needed. Errors use Anthropic's shape with the same status codes.

Parameters

ParameterTypeRequiredWhat it does
modelstringA model id from the model list. More
max_tokensintegerCaps the reply, thinking included. More
messagesarrayThe conversation. Images go in as base64 image blocks. Video returns a 400. More
thinkingobjectTurn thinking on. Without it the model thinks as little as it can. More
output_config.effortstringlow, high or max. More
toolsarrayTools the model may call with tool_use blocks. More
streambooleanStreams the reply as events. More

Thinking budget

A budget maps to an effort level.

budget_tokensRuns as
Under 8,192low
8,192 to 32,767high
32,768 or moremax