HomeModels › Doubao-Seed-2.0-Code
ByteDance · Code Specialist

Doubao-Seed-2.0-Code API

Code-specialized model with unified input-length-based pricing. Optimized for code generation, review, completion.

$0.10
Input / 1M tokens
$0.10
Output / 1M tokens
128K
Context window
0%
Platform fee
Sign Up — Get $0.50 Free Credit See All Pricing

Why use Doubao-Seed-2.0-Code on NovAI?

  • Unified $0.09/1M pricing (no input/output price gap)
  • Specialized training on code repositories
  • Excels at Python, JavaScript, Java, Go, Rust, C++
  • FIM (fill-in-middle) mode for IDE integrations
  • Strong at code review, refactoring, bug detection

Best use cases

  • IDE auto-complete backends
  • Automated code review
  • Code migration & refactoring
  • Programming education assistants

Quick start

cURL

curl https://aiapi-pro.com/v1/chat/completions \
  -H "Authorization: Bearer $NOVAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-2.0-code",
    "messages": [{"role":"user","content":"Hello"}]
  }'

Python (OpenAI SDK)

from openai import OpenAI
client = OpenAI(
    base_url="https://aiapi-pro.com/v1",
    api_key="YOUR_NOVAI_API_KEY",
)
resp = client.chat.completions.create(
    model="doubao-seed-2.0-code",
    messages=[{"role":"user","content":"Hello"}],
)
print(resp.choices[0].message.content)

Full documentation: aiapi-pro.com/#docs

Ready to try Doubao-Seed-2.0-Code?

Zero platform fee. Credits never expire. OpenAI-compatible API — no code changes needed.

Sign Up Free