TL;DR
DeepSeek fashions, together with DeepSeek‑R1 and DeepSeek‑V3.1, are accessible straight via the Clarifai platform. You may get began with no need a separate DeepSeek API key or endpoint.
- Experiment within the Playground: Join a Clarifai account and open the Playground. This allows you to check prompts interactively, alter parameters, and perceive the mannequin conduct earlier than integration.
- Combine through API: Combine fashions through Clarifai’s OpenAI-compatible endpoint by specifying the mannequin URL and authenticating together with your Private Entry Token (PAT).
https://api.clarifai.com/v2/ext/openai/v1
Authenticate together with your Private Entry Token (PAT) and specify the mannequin URL, comparable to DeepSeek‑R1 or DeepSeek‑V3.1.
Clarifai handles all internet hosting, scaling, and orchestration, letting you focus purely on constructing your software and utilizing the mannequin’s reasoning and chat capabilities.
DeepSeek in 90 Seconds—What and Why
DeepSeek encompasses a variety of huge language fashions (LLMs) designed with various architectural methods to optimize efficiency throughout numerous duties. Whereas some fashions make use of a Combination-of-Consultants (MoE) strategy, others make the most of dense architectures to stability effectivity and functionality.
1. DeepSeek-R1
DeepSeek-R1 is a dense mannequin that integrates reinforcement studying (RL) with information distillation to boost reasoning capabilities. It employs a regular transformer structure augmented with Multi-Head Latent Consideration (MLA) to enhance context dealing with and cut back reminiscence overhead. This design allows the mannequin to attain excessive efficiency in duties requiring deep reasoning, comparable to arithmetic and logic.
2. DeepSeek-V3
DeepSeek-V3 adopts a hybrid strategy, combining each dense and MoE parts. The dense half handles common conversational duties, whereas the MoE element prompts specialised specialists for advanced reasoning duties. This structure permits the mannequin to effectively swap between common and specialised modes, optimizing efficiency throughout a broad spectrum of functions.
3. Distilled Fashions
To offer extra accessible choices, DeepSeek presents distilled variations of its fashions, comparable to DeepSeek-R1-Distill-Qwen-7B. These fashions are smaller in measurement however retain a lot of the reasoning and coding capabilities of their bigger counterparts. For example, DeepSeek-R1-Distill-Qwen-7B is predicated on the Qwen 2.5 structure and has been fine-tuned with reasoning information generated by DeepSeek-R1, attaining robust efficiency in mathematical reasoning and common problem-solving duties.
How one can Entry DeepSeek on Clarifai
DeepSeek fashions will be accessed on Clarifai in 3 ways: via the Clarifai Playground UI, through the OpenAI-compatible API, or utilizing the Clarifai SDK. Every methodology gives a distinct degree of management and suppleness, permitting you to experiment, combine, and deploy fashions in line with your improvement workflow.
Clarifai Playground
The Playground gives a quick, interactive atmosphere to check prompts and discover mannequin conduct.
You possibly can choose any DeepSeek mannequin, together with DeepSeek‑R1, DeepSeek‑V3.1, or distilled variations out there on the neighborhood. You possibly can enter prompts, alter parameters comparable to temperature and streaming, and instantly see the mannequin responses. The Playground additionally means that you can evaluate a number of fashions facet by facet to check and consider their responses.
Inside the Playground itself, you may have the choice to view the API part, the place you may entry code snippets in a number of languages, together with cURL, Java, JavaScript, Node.js, the OpenAI-compatible API, the Clarifai Python SDK, PHP, and extra.
You possibly can choose the language you want, copy the snippet, and straight combine it into your functions. For extra particulars on testing fashions and utilizing the Playground, see the Clarifai Playground Quickstart

Attempt it: The Clarifai Playground is the quickest option to check prompts. Navigate to the mannequin web page and click on “Take a look at in Playground”.
By way of the OpenAI‑Appropriate API
Clarifai gives a drop-in alternative for the OpenAI API, permitting you to make use of the identical Python or TypeScript consumer libraries you’re acquainted with whereas pointing to Clarifai’s OpenAI-compatible endpoint. Upon getting your PAT set as an atmosphere variable, you may name any Clarifai-hosted DeepSeek mannequin by specifying the mannequin URL.
Python Instance
import os
from openai import OpenAI
consumer = OpenAI(
base_url=“https://api.clarifai.com/v2/ext/openai/v1”,
api_key=os.environ[“CLARIFAI_PAT”]
)
response = consumer.chat.completions.create(
mannequin=“https://clarifai.com/deepseek-ai/deepseek-chat/fashions/DeepSeek-R1”,
messages=[
{“role”: “system”, “content”: “You are a helpful assistant.”},
{“role”: “user”, “content”: “Tell me a three sentence bedtime story about a unicorn.”}
],
max_completion_tokens=100,
temperature=0.7
)
print(response.decisions[0].message.content material)
TypeScript Instance
import OpenAI from “openai”;
const consumer = new OpenAI({
baseURL: “https://api.clarifai.com/v2/ext/openai/v1”,
apiKey: course of.env.CLARIFAI_PAT,
});
const response = await consumer.chat.completions.create({
mannequin: “https://clarifai.com/deepseek-ai/deepseek-chat/fashions/DeepSeek-R1”,
messages: [
{ role: “system”, content: “You are a helpful assistant.” },
{ role: “user”, content: “Who are you?” }
],
});
console.log(response.decisions?.[0]?.message.content material);
Clarifai Python SDK
Clarifai’s Python SDK simplifies authentication and mannequin calls, permitting you to work together with DeepSeek fashions utilizing concise Python code. After setting your PAT, you may initialize a mannequin consumer and make predictions with only a few strains.
import os
from clarifai.consumer import Mannequin
mannequin = Mannequin(
url=“https://clarifai.com/deepseek-ai/deepseek-chat/fashions/DeepSeek-V3_1”,
pat=os.environ[“CLARIFAI_PAT”]
)
response = mannequin.predict(
immediate=“What’s the way forward for AI?”,
max_tokens=512,
temperature=0.7,
top_p=0.95,
pondering=“False”
)
print(response)
Vercel AI SDK
For contemporary net functions, the Vercel AI SDK gives a TypeScript toolkit to work together with Clarifai fashions. It helps the OpenAI-compatible supplier, enabling seamless integration.
import { createOpenAICompatible } from “@ai-sdk/openai-compatible”;
import { generateText } from “ai”;
const clarifai = createOpenAICompatible({
baseURL: “https://api.clarifai.com/v2/ext/openai/v1”,
apiKey: course of.env.CLARIFAI_PAT,
});
const mannequin = clarifai(“https://clarifai.com/deepseek-ai/deepseek-chat/fashions/DeepSeek-R1”);
const { textual content } = await generateText({
mannequin,
messages: [
{ role: “system”, content: “You are a helpful assistant.” },
{ role: “user”, content: “What is photosynthesis?” }
],
});
console.log(textual content);
This SDK additionally helps streaming responses, software calling, and different superior options.Along with the above, DeepSeek fashions will also be accessed through cURL, PHP, Java, and different languages. For an entire listing of integration strategies, supported suppliers, and superior utilization examples, discuss with the documentation.
Superior Inference Patterns
DeepSeek fashions on Clarifai assist superior inference options that make them appropriate for production-grade workloads. You possibly can allow streaming for low-latency responses, and software calling to let the mannequin work together dynamically with exterior techniques or APIs. These capabilities work seamlessly via Clarifai’s OpenAI-compatible API.
Streaming Responses
Streaming returns mannequin output token by token, enhancing responsiveness in real-time functions like chat interfaces or dashboards. The instance beneath exhibits the way to stream responses from a DeepSeek mannequin hosted on Clarifai.
import os
from openai import OpenAI
# Initialize the OpenAI-compatible consumer for Clarifai
consumer = OpenAI(
base_url=“https://api.clarifai.com/v2/ext/openai/v1”,
api_key=os.environ[“CLARIFAI_PAT”]
)
# Create a chat completion request with streaming enabled
response = consumer.chat.completions.create(
mannequin=“https://clarifai.com/deepseek-ai/deepseek-chat/fashions/DeepSeek-V3_1”,
messages=[
{“role”: “system”, “content”: “You are a helpful assistant.”},
{“role”: “user”, “content”: “Explain how transformers work in simple terms.”}
],
max_completion_tokens=150,
temperature=0.7,
stream=True
)
print(“Assistant’s Response:”)
for chunk in response:
if chunk.decisions and chunk.decisions[0].delta and chunk.decisions[0].delta.content material is not None:
print(chunk.decisions[0].delta.content material, finish=“”)
print(“n”)
Streaming helps you render partial responses as they arrive as an alternative of ready for all the output, lowering perceived latency.
Device Calling
Device calling allows a mannequin to invoke exterior features throughout inference, which is particularly helpful for constructing AI brokers that may work together with APIs, fetch reside information, or carry out dynamic reasoning. DeepSeek-V3.1 helps software calling, permitting your brokers to make context-aware choices. Under is an instance of defining and utilizing a software with a DeepSeek mannequin.
import os
from openai import OpenAI
# Initialize the OpenAI-compatible consumer for Clarifai
consumer = OpenAI(
base_url=“https://api.clarifai.com/v2/ext/openai/v1”,
api_key=os.environ[“CLARIFAI_PAT”]
)
# Outline a easy perform the mannequin can name
instruments = [
{
“type”: “function”,
“function”: {
“name”: “get_weather”,
“description”: “Returns the current temperature for a given location.”,
“parameters”: {
“type”: “object”,
“properties”: {
“location”: {
“type”: “string”,
“description”: “City and country, for example ‘New York, USA'”
}
},
“required”: [“location”],
“additionalProperties”: False
}
}
}
]
# Create a chat completion request with tool-calling enabled
response = consumer.chat.completions.create(
mannequin=“https://clarifai.com/deepseek-ai/deepseek-chat/fashions/DeepSeek-V3_1”,
messages=[
{“role”: “user”, “content”: “What is the weather like in New York today?”}
],
instruments=instruments,
tool_choice=‘auto’
)
# Print the software name proposed by the mannequin
tool_calls = response.decisions[0].message.tool_calls
print(“Device calls:”, tool_calls)
For extra superior inference patterns, together with multi-turn reasoning, structured output technology, and prolonged examples of streaming and power calling, discuss with the documentation
Which DeepSeek Mannequin Ought to I Decide?
Clarifai hosts a number of DeepSeek variants. Selecting the best one relies on your process:
- DeepSeek‑R1 – use for reasoning and sophisticated code. It excels at mathematical proofs, algorithm design, debugging and logical inference. Count on slower responses on account of prolonged “pondering mode,” and better token utilization.
- DeepSeek‑V3.1 – use for common chat and light-weight coding. V3.1 is a hybrid: it may swap between non‑pondering mode (quicker, cheaper) and pondering mode (deeper reasoning) inside a single mannequin. Superb for summarization, Q&A and on a regular basis assistant duties.
- Distilled fashions (R1‑Distill‑Qwen‑7B, and so on.) – these are smaller variations of the bottom fashions, providing decrease latency and value with barely decreased reasoning depth. Use them when pace issues greater than maximal efficiency.
On the time of writing, DeepSeek‑OCR has simply been introduced and isn’t but out there on Clarifai. Regulate Clarifai’s mannequin catalog for updates.
Incessantly Requested Questions (FAQs)
Q1: Do I want a DeepSeek API key?
No. When utilizing Clarifai, you solely want a Clarifai Private Entry Token. Don’t use or expose the DeepSeek API key except you’re calling DeepSeek straight (which this information doesn’t cowl).
Q2: How do I swap between fashions in code?
Change the mannequin worth to the Clarifai mannequin ID, comparable to openai/deepseek-ai/deepseek-chat/fashions/DeepSeek-R1 for R1 or openai/deepseek-ai/deepseek-chat/fashions/DeepSeek-V3.1 for V3.1.
Q3: What parameters can I tweak?
You possibly can alter temperature, top_p and max_tokens to regulate randomness, sampling breadth and output size. For streaming responses, set stream=True. Device calling requires defining a software schema.
This fall: Are there charge limits?
Clarifai enforces delicate charge limits per PAT. Implement exponential backoff and keep away from retrying 4XX errors. For prime throughput, contact Clarifai to extend quotas.
Q5: Is my information safe?
Clarifai processes requests in safe environments and complies with main information‑safety requirements. Retailer your PAT securely and keep away from together with delicate information in prompts except crucial.
Q6: Can I advantageous‑tune DeepSeek fashions?
DeepSeek fashions are MIT‑licensed. Clarifai plans to supply non-public internet hosting and advantageous‑tuning for enterprise prospects within the close to future. Till then, you may obtain and advantageous‑tune the open‑supply fashions by yourself infrastructure.
Conclusion
You now have a quick, normal option to combine DeepSeek fashions, together with R1, V3.1, and distilled variants, into your functions. Clarifai handles all infrastructure, scaling, and orchestration. No separate DeepSeek key or advanced setup is required. Attempt the fashions at present via the Clarifai Playground or API and combine them into your functions.
