DeepSeek V4

Call DeepSeek V4 Pro and Flash through HopBase's OpenAI-compatible Chat Completions API.

DeepSeek V4 runs over HopBase's OpenAI-compatible protocol. Use https://api.hop-base.com/v1 with Authorization: Bearer sk-your-key, and take the exact model ID from GET /v1/models.

Models

Model IDNotes
deepseek-v4-pro-202606V4 Pro
deepseek-v4-flash-202605V4 Flash, 1M context, up to 384,000 output tokens

Both sit in the same plan group, so one key reaches both.

The short names are not callable

Only the dated IDs above are production models. deepseek-v4-flash is rejected with a 400 naming deepseek-v4-flash-202605 as the replacement, and deepseek-v4-pro returns 404 model_not_found. Neither reaches a model — read the ID from GET /v1/models instead of shortening it.

Endpoint

POST /v1/chat/completions is the supported entry point. Streaming works normally.

Ask for usage explicitly when streaming

Send stream_options: { "include_usage": true } if your client needs to read token usage from a streamed response. Billing is accurate either way, but without that flag the usage chunk is not delivered to the client.

Two things DeepSeek offers on its own API are not available here: fill-in-the-middle completion and prefix completion. Those live on paths HopBase does not route.

Claude Code cannot use these models. It speaks the Anthropic Messages protocol, which HopBase maps onto GPT models rather than DeepSeek.

Reasoning output

DeepSeek returns its thinking trace in a separate reasoning_content field, not inside content. Read it explicitly if you want it.

completion_tokens already includes reasoning tokens, so treat it as the real output length and do not add reasoning_tokens on top. This differs from Grok, where the chat endpoint reports them separately and they must be added.

What the gateway changes in your request

BehaviorEffect on your request
Message-history guardA request with more than 26 messages keeps at most the first 2 system / developer messages plus the last 24 messages. Everything in between is dropped
previous_response_idRemoved if present. Requests are balanced across accounts, so an ID issued by one is not valid on another
Empty messagesRejected with a 400 before any upstream call

The history guard applies even to the 1M-context model

A long multi-turn conversation is truncated by message count, not by token count. If your agent depends on the full history, compress it into fewer messages yourself, and keep anything that must survive in the first two system messages.

Prompt caching

Prefix caching is implicit — there is nothing to switch on and no cache-control parameter to send. A hit is reported in the standard OpenAI field usage.prompt_tokens_details.cached_tokens.

Your HopBase usage record and the response body count input differently, which matters when you reconcile:

FieldMeaning
Response prompt_tokensWhole prompt, cached portion included
Usage record Input tokensPrompt minus the cached portion
Usage record Cached input tokensThe cached portion, listed separately

So the usage record's input plus cached input equals the response's prompt_tokens. Cache read is priced separately from plain input; see the signed-in model catalog for the rate that applies to your key.

curl

curl https://api.hop-base.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro-202606",
    "messages": [{ "role": "user", "content": "Summarize this quarter'\''s risks in five bullets." }]
  }'

Model identity in responses

The model field in the response always echoes the public ID you requested. HopBase keeps that stable even when the request is served by a different upstream route, so a client that asserts response.model == request.model keeps working.

DeepSeek Harness covers connecting the dsh agent runtime itself — the settings file and the custom-provider form. This page is the model contract behind it.

On this page