LLM Resayil is a fully Anthropic‑compatible large‑language‑model API that runs from a US‑based data center and offers native Arabic language support alongside a broad multi‑language capability set. With 39 active models ranging from high‑throughput chat models to deep‑thinking and vision‑enabled architectures, developers can pick the exact size and specialty they need without leaving the familiar Anthropic request format. The platform also supports streaming, function calling, tool use, and vision, making it a one‑stop solution for complex, multilingual applications.
Introduction to LLM Resayil and Anthropic SDK Compatibility
LLM Resayil is a fully Anthropic‑compatible large‑language‑model API that runs from a US‑based data center and offers native Arabic language support alongside a broad multi‑language capability set. With 39 active models ranging from high‑throughput chat models to deep‑thinking and vision‑enabled architectures, developers can pick the exact size and specialty they need without leaving the familiar Anthropic request format. The platform also supports streaming, function calling, tool use, and vision, making it a one‑stop solution for complex, multilingual applications.
Using the Anthropic SDK to talk to LLM Resayil brings two major benefits. First, you keep the same client‑side code you would use for Anthropic’s own service, which dramatically reduces the learning curve. Second, by merely pointing the SDK at the Resayil base URL (https://llm.resayil.io) and providing your Resayil API key, you instantly unlock pay‑per‑use pricing, USD‑only billing via Stripe or PayPal, and the ability to switch between any of the 39 catalog models. This guide walks you through the entire process— from installing the SDK to enabling streaming and tool use—so you can have a multilingual chatbot up and running in under five minutes.
Comparison Table
| Feature | LLM Resayil (this guide) | OpenAI SDK |
|---------|--------------------------|-----------|
| Compatibility | Anthropic‑compatible API | OpenAI‑compatible API |
| Arabic support | ✅ Native Arabic language support | ❌ Requires prompt engineering |
| Streaming | ✅ Supported via stream=true | ✅ Supported |
| Function calling / Tool use | ✅ Built‑in tool_use capability | ✅ Supported |
| Pay‑per‑use billing | ✅ USD credits, Stripe & PayPal | ✅ Usage‑based billing |
| Hosting location | USA | USA |
| Model catalog size | 39 models (chat, thinking, vision, code) | Fewer than 20 core models |
What LLM Resayil Offers
LLM Resayil delivers an OpenAI‑compatible and Anthropic‑compatible API that can be accessed with the same request schema you already know. Its Arabic language support means you can send prompts in Arabic and receive fluent, context‑aware responses without extra translation layers. The platform’s multi‑language capability also covers English, French, Spanish, and many more, making it ideal for global applications.
The streaming feature lets you receive token‑by‑token output, which is perfect for real‑time chat interfaces. With function calling and tool use, you can instruct the model to invoke external APIs, perform calculations, or fetch data, all within a single request. Additionally, the catalog includes vision‑enabled models like qwen3-vl:235b for image understanding, and thinking models such as deepseek-v4-pro for complex reasoning tasks.
Pricing is simple: you buy credits in USD via Stripe or PayPal, and each request consumes credits based on token usage. There are no hidden fees, and the pay‑per‑use model scales naturally with your application’s traffic.
What the OpenAI SDK Offers
The OpenAI SDK provides a straightforward way to interact with OpenAI’s own models, supporting chat completions, embeddings, fine‑tuning, and more. It includes built‑in helpers for streaming responses, handling rate limits, and managing API keys. While the SDK is powerful, it is tightly coupled to OpenAI’s model catalog and pricing structure, which may not include native Arabic support or the same breadth of vision and thinking models found on LLM Resayil.
Why LLM Resayil Wins for Anthropic‑SDK Users
If you are already comfortable with the Anthropic SDK, switching to LLM Resayil is a matter of changing the base URL and your API key. You keep the same request format, benefit from Arabic‑first language handling, and gain access to a larger, more diverse model catalog without additional integration work. The pay‑per‑use model means you only pay for what you consume, and the USD‑only billing via Stripe or PayPal simplifies accounting. For developers building multilingual chatbots, the combination of Anthropic compatibility, streaming, and tool use makes LLM Resayil the most efficient choice.
What You Get by Using LLM Resayil
- Anthropic‑compatible API – drop‑in replacement for Anthropic endpoints.
- Arabic language support – native handling of right‑to‑left scripts.
- Streaming – real‑time token delivery for responsive UI.
- Function calling & tool use – orchestrate external services directly from the model.
- Vision models – add image understanding without extra services.
- Thinking models – perform deep reasoning and complex problem solving.
- Pay‑per‑use credits – pay only for the tokens you generate, billed in USD via Stripe or PayPal.
- Integrations – ready‑to‑use with n8n, LangChain, LiteLLM, and the Anthropic SDK itself.
Prerequisites: What You Need Before Starting
Before you write a single line of code, make sure you have the following:
- LLM Resayil account – sign up at https://llm.resayil.io and verify your email.
- API key – generate a key from the dashboard after adding credits. Credits are purchased in USD using Stripe or PayPal.
- Development environment – Python 3.8+ or Node.js 14+. Ensure
pipornpmis available. - Anthropic SDK – install the official SDK for your language (Python or JavaScript).
- Optional: cURL – for quick testing from the command line.
Having these ready will let you move straight from installation to a working chat completion.
Step 1: Install the Anthropic SDK and Configure the Client
Python
pip install anthropic
JavaScript (Node.js)
npm install anthropic
After installation, configure the client to point at LLM Resayil’s base URL and supply your API key. The SDK expects an api_key header and a base_url parameter.
Python example
import os
from anthropic import Anthropic
# Load your Resayil API key from an environment variable for safety
api_key = os.getenv("RESAYIL_API_KEY")
client = Anthropic(
api_key=api_key,
base_url="https://llm.resayil.io"
)
JavaScript example
const { Anthropic } = require("anthropic");
const client = new Anthropic({
apiKey: process.env.RESAYIL_API_KEY,
baseUrl: "https://llm.resayil.io",
});
Both snippets set the base_url to the Resayil endpoint, turning the Anthropic SDK into a direct Resayil client. Remember to keep your API key secret and never commit it to source control.
Step 2: Make Your First Chat Completion Request
Now that the client is ready, you can send a simple chat message. LLM Resayil exposes the Anthropic‑compatible /v1/messages endpoint, which accepts a list of messages and returns a completion.
Python code
response = client.messages.create(
model="deepseek-v4-flash", # a fast chat model from the 39‑model catalog
max_tokens=512,
temperature=0.7,
messages=[
{"role": "user", "content": "مرحبًا! كيف يمكنني مساعدة زبائني اليوم؟"}
]
)
print(response.content[0].text)
JavaScript code
(async () => {
const response = await client.messages.create({
model: "deepseek-v4-flash",
maxTokens: 512,
temperature: 0.7,
messages: [{ role: "user", content: "مرحبًا! كيف يمكنني مساعدة زبائني اليوم؟" }],
});
console.log(response.content[0].text);
})();
The model field can be any of the 39 available slugs; you can list them via the /v1/models endpoint. In this example we chose deepseek-v4-flash, a chat‑optimized model that handles Arabic fluently. The response object contains a content array; the first element holds the generated text.
Step 3: Enable Streaming for Real‑Time Output
Streaming is ideal for UI components that display text as the model generates it. To enable streaming, set the stream flag to true (or stream=true in the request). The Anthropic SDK will yield partial messages that you can render immediately.
Ready to try Resayil LLM API?
Start FreePython streaming example
for chunk in client.messages.stream(
model="deepseek-v4-flash",
max_tokens=512,
temperature=0.7,
messages=[{"role": "user", "content": "أخبرني قصة قصيرة عن صديق وفيل."}],
stream=True,
):
if chunk.type == "content_block_delta":
print(chunk.delta.text, end="", flush=True)
JavaScript streaming example
(async () => {
const stream = await client.messages.stream({
model: "deepseek-v4-flash",
maxTokens: 512,
temperature: 0.7,
messages: [{ role: "user", content: "أخبرني قصة قصيرة عن صديق وفيل." }],
stream: true,
});
for await (const chunk of stream) {
if (chunk.type === "content_block_delta") {
process.stdout.write(chunk.delta.text);
}
}
})();
Both snippets use the streaming feature listed in the verified facts. The SDK yields content_block_delta objects that contain incremental text, allowing you to update the UI in real time.
Step 4: Using Tool Use and Function Calling
LLM Resayil’s tool_use capability lets the model request execution of external functions. Define a tool specification that matches the Anthropic SDK format, then include it in the request. The model can call the tool, and you handle the result in your application code.
Define a simple calculator tool (Python)
tool = {
"name": "calculator",
"description": "Performs basic arithmetic operations.",
"input_schema": {
"type": "object",
"properties": {
"expression": {"type": "string", "description": "Arithmetic expression, e.g., '12 / 4'"}
},
"required": ["expression"]
}
}
Send a request that enables tool use
response = client.messages.create(
model="deepseek-v4-pro", # a thinking model suitable for tool reasoning
max_tokens=256,
temperature=0.0,
tools=[tool],
messages=[
{"role": "user", "content": "ما ناتج 15 * 7؟"}
]
)
# Check if the model requested a tool call
if response.stop_reason == "tool_use":
tool_call = response.content[0].tool_use
expression = tool_call.input["expression"]
# Simple safe eval (for demo purposes only)
result = eval(expression)
# Send the result back to the model
follow_up = client.messages.create(
model="deepseek-v4-pro",
max_tokens=128,
temperature=0.0,
messages=[
{"role": "assistant", "content": f"Tool result: {result}"}
]
)
print(follow_up.content[0].text)
JavaScript version (brief)
const tool = {
name: "calculator",
description: "Performs basic arithmetic operations.",
input_schema: {
type: "object",
properties: { expression: { type: "string", description: "e.g., '12 / 4'" } },
required: ["expression"],
},
};
(async () => {
const response = await client.messages.create({
model: "deepseek-v4-pro",
maxTokens: 256,
temperature: 0.0,
tools: [tool],
messages: [{ role: "user", content: "ما ناتج 15 * 7؟" }],
});
if (response.stop_reason === "tool_use") {
const expr = response.content[0].tool_use.input.expression;
const result = eval(expr);
const followUp = await client.messages.create({
model: "deepseek-v4-pro",
maxTokens: 128,
temperature: 0.0,
messages: [{ role: "assistant", content: `Tool result: ${result}` }],
});
console.log(followUp.content[0].text);
}
})();
These examples illustrate function calling and tool use, both listed as features of LLM Resayil. By defining tools, you let the model decide when external computation is needed, creating powerful, dynamic applications.
Troubleshooting and Best Practices
| Issue | Likely Cause | Fix |
|-------|--------------|-----|
| 401 Unauthorized | Wrong API key or missing Authorization header | Verify the key from the Resayil dashboard and ensure it is passed as Bearer <key>.
| 404 Base URL | Using the default Anthropic endpoint instead of https://llm.resayil.io | Update the SDK base_url configuration.
| Rate limit exceeded | Too many requests in a short period | Implement exponential back‑off and respect the Retry-After header.
| Arabic garbled output | Incorrect encoding or missing UTF‑8 handling | Ensure your source files are saved as UTF‑8 and that the console/terminal supports RTL scripts.
| Tool call not returning | Model did not select tool_use | Provide clearer instructions in the prompt and enable temperature=0.0 for deterministic behavior.
Best practices:
- Store the API key securely (environment variable or secret manager).
- Use the
max_tokensparameter to control cost; every token consumes credits. - When handling Arabic, set
temperaturemodestly (0.6‑0.8) to balance fluency and consistency. - Log the full request and response for debugging, but redact the API key.
- Periodically call
/v1/modelsto stay aware of new models added to the catalog.
Conclusion and Next Steps
You have now seen how to install the Anthropic SDK, point it at the LLM Resayil endpoint, make a basic chat request, enable streaming, and harness tool use for function calling—all within five minutes. The combination of Anthropic compatibility, native Arabic support, and a diverse model catalog makes Resayil the ideal platform for multilingual chatbots and AI‑augmented applications.
Ready to go deeper? Check the pricing page to add more credits, explore the full model list, and integrate with tools like n8n, LangChain, or LiteLLM using the same SDK. If you haven’t created an account yet, register now and start building.
FAQ
Q: Is the Anthropic SDK fully compatible with LLM Resayil?
A: Yes. LLM Resayil is Anthropic‑compatible; you only need to change the base URL to https://llm.resayil.io and use your Resayil API key.
Q: Which models can I use with the Anthropic SDK on LLM Resayil?
A: LLM Resayil offers 39 active models across chat, thinking, vision, and code categories. You can list them via the /v1/models endpoint.
Q: Does LLM Resayil support streaming with the Anthropic SDK?
A: Yes. Streaming is supported; pass stream=true (or stream=True in Python) in the request to receive token‑by‑token output.
Q: Can I use tool use (function calling) with the Anthropic SDK on LLM Resayil? A: Yes. LLM Resayil supports tool use and function calling. Define tools in the Anthropic SDK format and the model can invoke them.
Q: How do I get an API key for LLM Resayil? A: Sign up at https://llm.resayil.io, add credits via Stripe or PayPal, and generate an API key from the dashboard.
Happy coding!