DeepSeek v4.1 Flash

deepseek-v4.1-flash

Use the DeepSeek v4.1 Flash API for chat, coding, and reasoning. Send conversation messages to get a text response through a chat completions route. Build assistants that explain errors, review changes, and draft fixes. Compare the available provider routes, request examples, and usage prices on OpenAny.

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

Provider

Published price $0.116 / 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.1-flash",
  "route_mode": "balanced"
}'

Response example

Configured response example · not a live result

JSON
{
  "id": "chatcmpl-0bda71b2-52a7-97e6-a047-fdf6936ceb1b",
  "model": "deepseek-v4.1-flash",
  "usage": {
    "total_tokens": 76,
    "prompt_tokens": 31,
    "completion_tokens": 45,
    "prompt_tokens_details": {
      "text_tokens": 31,
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 9,
      "reasoning_tokens": 35
    }
  },
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?",
        "reasoning_content": "We need answer greeting. User says hello. Need maybe respond. We need final only. But system says API, desired oververbosity 5. We can just greet."
      },
      "finish_reason": "stop"
    }
  ],
  "created": 1789456959,
  "openmodels_cost": 57
}

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.1 Flash through OpenAny?

Use model ID deepseek-v4.1-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.1 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.1 Flash with your agent

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