Quickstart

Quickstart

Three steps: create a key, add credits, and send a request with the OpenAI or Anthropic SDK you already use.

1. Create an API key

Create a key on the API keys page. It is shown only once, so save it as an environment variable.

Shell
export SILK_API_KEY="sk-..."

2. Add credits

Requests are paid from prepaid credits. Add them on the Top up page by card or crypto. See Billing and credits.

3. Send a request

Set the base URL to https://api.silkcompute.com and pick a model from Models.

Set up this project to use the Silk Compute API with the model deepseek-v4.1-flash-1017-uncensored.

Silk Compute is OpenAI compatible:
- Base URL: https://api.silkcompute.com
- Chat: POST /chat/completions (the Anthropic format is also served at /v1/messages)
- Auth: read the API key from the SILK_API_KEY environment variable. Never hard-code or commit it.

Model deepseek-v4.1-flash-1017-uncensored: 1,048,576 tokens of context, up to 393,216 output tokens. Tool calling and streaming are supported.
Reasoning effort (reasoning_effort): low, high, max (default high).

1. Use the OpenAI SDK if this project already has it; otherwise add the official one for its language.
2. Add a small client that sends a chat request to deepseek-v4.1-flash-1017-uncensored and returns the reply text.
3. Add SILK_API_KEY to the example env file if there is one, then show me how to send one test request.

Full API reference: https://silkcompute.com/llms.txt

With the Anthropic SDK, pass the same base URL. The SDK adds /v1/messages itself.

Python
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=1024,
    messages=[{"role": "user", "content": "Explain why the sky is blue."}],
)

print(message.content[0].text)

Endpoints

Base URLhttps://api.silkcompute.com
Chat CompletionsPOST /chat/completions
ResponsesPOST /responses
Anthropic MessagesPOST /v1/messages
List modelsGET /models
AuthenticationAuthorization: Bearer $SILK_API_KEY or x-api-key: $SILK_API_KEY

Tools that expect the base URL to end in /v1 work too: https://api.silkcompute.com/v1 serves the same API.