DeepSeek v4 Flash

deepseek-v4-flash

Use the DeepSeek V4 Flash API for chat, reasoning, and code generation in developer tools and automated workflows. Send code, logs, or technical documents as messages. The listed route publishes a context limit of one million tokens. Use it for code review, debugging, and questions about long technical documents. Ask the model to explain an error, outline a fix, or draft an implementation from existing code. Check request examples, provider routes, and usage pricing on the detail page.

Published price
From $0.217 / 1M tokens
Billing unit
/ 1M tokens
Context / Max output
1000K / 384K
Listed routes
1
Base URL
https://api.openany.si/v1
POST
/v1/chat/completions
Authentication
Authorization: Bearer $OPENANY_API_KEY

Provider

Published price $0.217 / 1M tokens

Request parameters

ParameterType / rangeDefault valueRequiredDescription
messagesarray—YesMessages in conversation order.
modelstring—YesPublic model name used by OpenAny.
logprobsboolean—Nologprobs
max_tokensinteger · 1 ~ 393216—Nomax_tokens
reasoning_effortstring · none | minimal | low | medium | high | xhigh | max—NoReasoning effort level.
response_formatobject—Noresponse_format
routeobject—NoOpenAny routing settings.
route_modestring—NoOpenAny route selection mode.
stopstring | array—Nostop
streamboolean—NoEnable streaming responses.
stream_optionsobject—Nostream_options
temperaturenumber · 0 ~ 2—Notemperature
thinkingobject—NoThinking mode for the model.
tool_choicestring | object—Notool_choice
toolsarray—Notools
top_logprobsinteger · 0 ~ 20—Notop_logprobs
top_pnumber · <= 1—Notop_p
user_idstring—Nouser_id

Request example

curl 'https://api.openany.si/v1/chat/completions' \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messages": [
    {
      "content": "Hello!",
      "role": "user"
    }
  ],
  "model": "deepseek-v4-flash",
  "route_mode": "balanced"
}'

Response example

Configured response example · not a live result

JSON
{
  "id": "954e4ffe-9c59-4216-8ee6-6235f72f81f9",
  "model": "deepseek-v4-flash",
  "usage": {
    "total_tokens": 222,
    "prompt_tokens": 5,
    "completion_tokens": 217,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 161
    }
  },
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "你好!👋 很高兴见到你!我是 DeepSeek,你的免费 AI 助手。有什么我可以帮你的吗?无论是回答问题、写作、编程、翻译,还是随便聊聊天,我都非常乐意帮忙!😊 请随时告诉我你的需求吧~",
        "reasoning_content": "好的,用户发来一个简单的问候“hello”。这是一个非常基础的打招呼,没有其他具体指令或问题。用户可能只是测试连接、开启对话,或者想打个招呼开始交流。深层需求应该是希望获得一个友好、热情的回应,并了解我能提供什么帮助。\n\n想到了用同样自然友好的方式回复“hello”,加上问候和自我介绍,表明我是DeepSeek助手。然后主动提供帮助选项,列举几个常见的我能做的事情,比如回答问题、写作、编程、聊天等。最后用开放式的邀请结束,让用户提出具体需求。整个回复保持热情、开放和乐于助人的语气。\n\n嗯,回复结构就这样:先问候和自我介绍,然后列举服务范围,最后邀请用户提出请求。用点表情符号增加亲和力,但保持简洁清晰。"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "created": 1784221144,
  "openmodels_cost": 55
}

Error handling

400Check the model ID and request fields.
429Retry with exponential backoff.
5xxRetry only temporary provider failures.

JSON Schema

{
  "type": "object",
  "allOf": [
    {
      "if": {
        "required": [
          "top_logprobs"
        ],
        "properties": {
          "top_logprobs": {
            "type": "integer"
          }
        }
      },
      "then": {
        "required": [
          "logprobs"
        ],
        "properties": {
          "logprobs": {
            "const": true
          }
        }
      }
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "model",
    "messages"
  ],
  "properties": {
    "stop": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 16,
          "minItems": 1
        }
      ]
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "description": "Public model name used by OpenAny."
    },
    "route": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        }
      },
      "description": "OpenAny routing settings."
    },
    "tools": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "type",
          "function"
        ],
        "properties": {
          "type": {
            "const": "function"
          },
          "function": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "strict": {
                "type": "boolean"
              },
              "parameters": {
                "type": "object"
              },
              "description": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "top_p": {
      "type": "number",
      "maximum": 1,
      "exclusiveMinimum": 0
    },
    "stream": {
      "type": "boolean",
      "description": "Enable streaming responses."
    },
    "user_id": {
      "type": "string"
    },
    "logprobs": {
      "type": "boolean"
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "if": {
              "properties": {
                "role": {
                  "enum": [
                    "user",
                    "system",
                    "developer"
                  ]
                }
              }
            },
            "then": {
              "required": [
                "content"
              ],
              "properties": {
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "image_url": {
                            "type": "object",
                            "required": [
                              "url"
                            ],
                            "properties": {
                              "url": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "role": {
                  "const": "tool"
                }
              }
            },
            "then": {
              "required": [
                "tool_call_id",
                "content"
              ]
            }
          }
        ],
        "required": [
          "role"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "enum": [
              "system",
              "user",
              "assistant",
              "tool"
            ],
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type"
                  ],
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "image_url": {
                      "type": "object",
                      "required": [
                        "url"
                      ],
                      "properties": {
                        "url": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "tool_call_id": {
            "type": "string"
          },
          "reasoning_content": {
            "type": "string"
          }
        }
      },
      "minItems": 1,
      "description": "Messages in conversation order."
    },
    "thinking": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "enabled",
            "disabled"
          ],
          "type": "string"
        }
      },
      "description": "Thinking mode for the model."
    },
    "max_tokens": {
      "type": "integer",
      "maximum": 393216,
      "minimum": 1
    },
    "route_mode": {
      "type": "string",
      "description": "OpenAny route selection mode."
    },
    "temperature": {
      "type": "number",
      "maximum": 2,
      "minimum": 0
    },
    "tool_choice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object"
        }
      ]
    },
    "top_logprobs": {
      "type": "integer",
      "maximum": 20,
      "minimum": 0
    },
    "stream_options": {
      "type": "object",
      "properties": {
        "include_usage": {
          "type": "boolean"
        }
      }
    },
    "response_format": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "text",
            "json_object"
          ],
          "type": "string"
        }
      }
    },
    "reasoning_effort": {
      "enum": [
        "none",
        "minimal",
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ],
      "type": "string",
      "description": "Reasoning effort level."
    }
  }
}

Model API questions

How do I call DeepSeek v4 Flash through OpenAny?

Use model ID deepseek-v4-flash with an OpenAny key and the operation published in this model's API tab. The model API base is https://api.openany.si/v1. Confirm the protocol and request schema; model availability does not imply every OpenAI API operation is supported.

How is DeepSeek v4 Flash billed?

Compare the published rate and billing unit of the selected provider route. Input, output and cache token rates may differ. Image, audio and video models can use other units. Recorded usage determines the charge under that route's billing contract.

Are Community and Verified routes the same as an official publisher API?

No. Inspect the provider name and supply classification for the specific route. A marketplace listing or a supply label is not a claim of publisher endorsement, identical service or measured uptime. Different route prices may reflect different supply and conditions.

Where do these prices come from, and when were they updated?

Rates come from the provider routes in OpenAny's public model catalog, not an independent quote from the model publisher. The catalog does not supply a price update timestamp. A page or catalog snapshot date is not a price revision date. Compare supply, billing units, tiers and conditions; a lower listed rate alone does not establish equivalent service or explain the price difference.

Use DeepSeek v4 Flash with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.