DeepInfra raises $107M Series B to scale the inference cloud — read the announcement

Starting from langchain v0.0.322 you can make efficient async generation and streaming tokens with deepinfra.
The deepinfra wrapper now supports native async calls, so you can expect more performance (no more threads per invocation) from your async pipelines.
from langchain.llms.deepinfra import DeepInfra
async def async_predict():
llm = DeepInfra(model_id="meta-llama/Llama-2-7b-chat-hf")
output = await llm.apredict("What is 2 + 2?")
print(output)
Streaming lets you receive each token of the response as it gets generated. This is indispensable in user-facing applications.
def streaming():
llm = DeepInfra(model_id="meta-llama/Llama-2-7b-chat-hf")
for chunk in llm.stream("[INST] Hello [/INST] "):
print(chunk, end='', flush=True)
print()
You can also use the asynchronous streaming API, natively implemented underneath.
async def async_streaming():
llm = DeepInfra(model_id="meta-llama/Llama-2-7b-chat-hf")
async for chunk in llm.astream("[INST] Hello [/INST] "):
print(chunk, end='', flush=True)
print()
GLM-5 API Benchmarks: Latency, Throughput & Cost<p>Updated November 2026. GLM-5 has been retired on DeepInfra. Its successor, GLM-5.3, is available now; see the GLM-5.3 API provider benchmarks for current figures. The benchmark analysis below is kept for reference. GLM-5 is the latest open-weights reasoning model released by Z AI (Zhipu AI) in February 2026, characterized by high “thinking token” usage. It […]</p>
Best Kimi K3.1 Pro API Providers (2026): Price, Tiers, Speed<p>Summary of the Best Kimi K3.1 Pro Providers Provider Best For DeepInfra Lowest price of the providers in this guide ($1.90 / $9.50), Flex and Priority tiers, 0% measured error rate, private endpoints Moonshot AI (Kimi API) First-party access, plus the Highspeed variant and Moonshot’s own coding and work apps DigitalOcean Fast responses at Moonshot’s […]</p>
Introducing Prompt Cache Retention: Keep Your Context Warm for 5 Minutes or an HourRetain a prompt's KV cache for 5 minutes or an hour — reuse skips prefill for a faster time to first token and bills at the discounted cache-read rate. One field on the request.© 2026 DeepInfra. All rights reserved.