How can you use Claude Code with a cheaper OpenAI-compatible API workflow?

Updated: 2026-07-05

Claude Code is powerful, but many coding tasks do not require the most expensive model for every step.

Short answer

Use Claude Code for high-risk reasoning and architecture, and use lizh.ai models for drafts, code explanations, tests, documentation, and repetitive edits.

Steps

  • Keep Claude-style models for complex judgment.
  • Configure an OpenAI-compatible client with lizh.ai.
  • Move routine coding tasks to lower-cost models.
  • Compare quality and cost on the same task.
  • Escalate to a stronger model only when needed.

Recommended models

  • GLM-5.2 for complex coding and reasoning.
  • DeepSeek for cost-sensitive code work.
  • MiniMax for quick general tasks.
  • Kimi for long code context.

Cost and reliability notes

  • Do not use the highest-cost model as the default for every step.
  • Draft with a cheaper model and review with a stronger model.
  • Remove unnecessary context from prompts.

How to do it with lizh.ai

Create an API key in lizh.ai and use it as a Bearer token in clients that support an OpenAI-compatible API.

Use Base URL: https://lizh.ai/v1

Related resources