Seed 2.0 Code API

ByteDance coding model for real-world development, IDE-style workflows, and reliable code generation.

Provider: ByteDance | Model ID: seed-2-code | Context Window: 256K tokens

On this model: 256K tokens context window, coding workload class, 75% cached-input discount, routed through ByteDance infrastructure.

Pricing

₹80/1M input · ₹450/1M output. Pay-as-you-go micro-metered billing. UPI and cards accepted with zero minimum commitment.

Token TypePrice (INR)
Input Tokens₹80/1M tokens
Output Tokens₹450/1M tokens
Prompt Caching Input₹20/1M tokens

Model Specifications

Model Identifierseed-2-code
ProviderByteDance
Categorycoding
Context Window256K tokens
Output Pricing Tierpremium
API ProtocolOpenAI-compatible REST API (JSON)
Endpointhttps://api.luminoai.co.in/v1/chat/completions

OpenAI-Compatible Integration

Drop into existing OpenAI SDK code by changing the base URL to https://api.luminoai.co.in/v1. The request shape below is the code generation pattern.

curl https://api.luminoai.co.in/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LUMINO_API_KEY" \
  -d '{
    "model": "seed-2-code",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Refactor this module for readability and explain the change."}
    ]
  }'

Good fit for code generation

  • Code completion, generation, and refactoring inside an IDE or CI job
  • Test generation and bug localisation against a repository context
  • Migration work where the model rewrites whole files
  • Code review assistants that must return structured findings

Why code generation costs what it does

Code models restate the problem before answering, which inflates output tokens on every call, and output is priced several times higher than input. Set max_tokens to what the diff actually needs, and pass only the files relevant to the task rather than the whole repository.

Seed 2.0 Code API FAQ

Can Seed 2.0 Code edit files directly?

The API returns text. Your client applies it. Use function calling if you want the model to request file writes through your own tool layer.

What context window should I plan for?

Check the specification table above. For repository-scale work, prefer models with the largest window and keep only the relevant files in context.

How do I keep code output deterministic?

Lower the temperature, pin the model id, and keep the instruction block stable so the prefix stays cacheable.

Explore all models in catalog | API Documentation | Test Seed 2.0 Code in Playground