SmutWriter Model

API docs

An OpenAI-compatible Chat Completions API. If your app can talk to OpenAI, it can talk to us.

Base URLhttps://api.smutwriter.com/v1
AuthAuthorization: Bearer sk-swm-…
Modelsmutwriter-v1

Using SillyTavern? Follow the step-by-step guide.

List models

curl https://api.smutwriter.com/v1/models -H "Authorization: Bearer $SWM_KEY"

Chat completion

curl https://api.smutwriter.com/v1/chat/completions \
  -H "Authorization: Bearer $SWM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "smutwriter-v1",
    "stream": true,
    "max_tokens": 800,
    "messages": [
      {"role": "system", "content": "You are Mara, a lighthouse keeper..."},
      {"role": "user", "content": "I knock on the green door."}
    ]
  }'

Streaming uses server-sent events, like OpenAI. Supported settings: max_tokens, temperature, top_p, top_k, min_p, frequency_penalty, presence_penalty, repetition_penalty, stop, seed, stream_options.include_usage. Replies are capped at 4096 tokens. The usage numbers in each response are what you are billed for.

Memory

Memory is automatic. A story is matched by your account and its longest leading system message (normally the character card). Add "story_id": "any-name" to the request body to keep separate memories for chats that share a card. In SillyTavern, put it under Additional Parameters → Include Body Parameters as story_id: my-second-run.

You can delete all story memory from your account page.

Limits

2 requests at a time and 30 per minute per account (shared by all its keys). Up to 32K tokens read per reply.

Errors

StatuscodeMeaning
401invalid_api_keyKey missing, wrong, or revoked.
402insufficient_balanceCredit is used up. Top up on your account page.
400context_length_exceededThe card alone is bigger than the context.
400content_policy_violationBlocked: content involving anyone under 18.
429concurrency_limit / rate_limit_exceededToo many requests at once or per minute.
503model_offline / overloadedTemporarily offline or very busy. Try again shortly.