Hosted by Rayu

DeepSeekDeepseek-v4.1-flash API

Rayu model ID

Credits x0.5

Rayu credit charge per 1M tokens

Each bucket is priced on its own and charged from actual usage.

Input
500Fresh prompt tokens
Output
1,500Tokens the model generates
Cache read
50Prompt tokens served from cache
Cache write
100Prompt tokens written to cache

Worked example

A request with 8,000 input and 2,000 output tokens, before cache discounts.

8,000 input × 500 / 1M4 cr
2,000 output × 1,500 / 1M3 cr
Total7 credits

Prompt tokens served from cache are billed at the cache-read rate instead. How tokens are charged

Capabilities

Context window1,000,000 tokens
SupportsReasoningVisionTool calling

Use it in Rayu Code

Signed in on a paid plan, select it in the CLI or VS Code with:

› /model deepseek-v4.1-flash-cloud

Or run /model and type to filter the picker.

Call Deepseek-v4.1-flash with the Rayu API

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["RAYU_API_KEY"],
    base_url="https://gateway.rayucode.com/v1",
)

response = client.chat.completions.create(
    model="deepseek-v4.1-flash-cloud",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
Key: RAYU_API_KEY · Model: · Base: https://gateway.rayucode.com/v1Create an API key