300 million tokens. $2.99 a month.See the subscription  

model apis · chat / llm

Kimi K2.7 Code API

Run Kimi K2.7 Code by Moonshot AI through one OpenAI-compatible endpoint. Pay per use against your deeprelay balance. No instance to rent, no deployment to manage.

Available now

Kimi K2.7 Code API pricing

Live catalog rates, billed per use against your deeprelay balance, no minimums. Kimi K2.7 Code is priced per use rather than included in the $2.99-a-month flat plan.

TierRate
Serverless
Input tokens: $1.01 / 1MCached input tokens: $0.201 / 1MOutput tokens: $4.24 / 1M

rates are read every few minutes from the live model catalog and metered per request

Call Kimi K2.7 Code in one request

Any OpenAI SDK works: set the base URL to https://api.deeprelay.ai/v1 and use your deeprelay API key.

curl
curl https://api.deeprelay.ai/v1/chat/completions \
  -H "Authorization: Bearer $DEEPRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deeprelay/kimi-k2.7-code",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deeprelay.ai/v1",
    api_key="YOUR_DEEPRELAY_API_KEY",
)

response = client.chat.completions.create(
    model="deeprelay/kimi-k2.7-code",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
JavaScript (OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deeprelay.ai/v1",
  apiKey: process.env.DEEPRELAY_API_KEY,
});

const response = await client.chat.completions.create({
  model: "deeprelay/kimi-k2.7-code",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);

Kimi K2.7 Code on deeprelay

Model iddeeprelay/kimi-k2.7-code
ModalityChat / LLM
AuthorMoonshot AI
Context window262,144 tokens
Streaming
Aliases
Flat planNot included: pay as you go

faq

Kimi K2.7 Code API questions

How much does the Kimi K2.7 Code API cost?

Kimi K2.7 Code on deeprelay currently costs $1.01 / 1M (input tokens), $0.201 / 1M (cached input tokens), $4.24 / 1M (output tokens), billed against your deeprelay balance as you go. There are no minimums. It is priced per use rather than included in the $2.99-a-month flat plan, which covers a named set of models.

Is the Kimi K2.7 Code API OpenAI-compatible?

Yes. Point any OpenAI SDK at https://api.deeprelay.ai/v1 with a deeprelay API key and request model "deeprelay/kimi-k2.7-code". No proprietary client needed.

What is the context window of Kimi K2.7 Code?

Kimi K2.7 Code supports a 262,144-token context window on deeprelay.

How does billing work?

Chat models bill per input and output token at the listed per-million-token rates, metered per request against your deeprelay balance. Where a cached-input rate is listed, the part of a prompt the serving partner answers from its prompt cache (reported as prompt_tokens_details.cached_tokens) bills at that lower rate instead of the input rate.