Skip to main content
To meet the demand for using the Anthropic API ecosystem, our API has added support for the Anthropic API format. With simple configuration, you can integrate the capabilities of Neosantara Model into the Anthropic API ecosystem.

Use Neosantara in Claude Code

1

Install Claude Code

npm i -g @anthropic-ai/claude-code
2

Config Environment Variables

export ANTHROPIC_BASE_URL=https://api.neosantara.xyz/anthropic
export ANTHROPIC_AUTH_TOKEN=${YOUR_API_KEY}
export API_TIMEOUT_MS=600000
export ANTHROPIC_MODEL=nusantara-base
export ANTHROPIC_SMALL_FAST_MODEL=nusantara-base
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
The API_TIMEOUT_MS parameter is configured to prevent excessively long outputs that could cause the Claude Code client to time out. Here, we set the timeout duration to 10 minutes.
3

Run the Claude Code

cd my-project
claude

Invoke Neosantara Model via Anthropic API

1

Install Anthropic SDK

pip install anthropic
2

Config Environment Variables

export ANTHROPIC_BASE_URL=https://api.neosantara.xyz/anthropic
export ANTHROPIC_API_KEY=${NAI_API_KEY}
3

Invoke the API

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="deepseek-r1-llama-70b",
    max_tokens=1000,
    system="You are a helpful assistant.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Hi, how are you?"
                }
            ]
        }
    ]
)
print(message.content)

Compatibility Matrix

ParameterRequiredTypeClaude SDKDefaultNotes
modelβœ… Yesstringβœ… Yes-Use Neosantara model instead
messagesβœ… Yesarrayβœ… Yes-Alternating user/assistant
max_tokensβœ… Yesintegerβœ… Yes-Min 1 token
temperature❌ Nonumberβœ… Yes1.0Range: 0.0-1.0
stream❌ Nobooleanβœ… YesfalseSSE format
top_p❌ Nonumberβœ… Yes1.0Range: 0.0-1.0
top_k❌ Nonumberβœ… Yes-Must be > 0
stop_sequences❌ Noarrayβœ… Yes[]Max 5 sequences
system❌ Nostring/arrayβœ… Yes-Separate parameter
tools❌ Noarrayβœ… Yes[]Function definitions
tool_choice❌ Nostringβœ… Yes”auto”auto/any/specific
metadata❌ Noobjectβœ… YesCustom tracking
service_tier❌ Nostringβœ… Yes”auto”auto/standard_only
thinking❌ Noobjectβœ… Yes-Extended thinking mode
Last modified on December 6, 2025