WizzyFlow
Docs menu

chat

Mistral Large

Mistral LLM, using the OpenAI chat format. Price $0.003 / 0.009 per 1K tokens. Prices in US dollars.

Try it in the Playground

OpenAI formatchat

mistralai/mistral-large

POST

Quick start

The endpoint is OpenAI's chat endpoint: in the SDK you already use, just change the base URL and the key. The example sends a single question.

curl https://api.wizzyflow.ai/v1/chat/completions \
  -H "Authorization: Bearer $WIZZYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistralai/mistral-large",
    "messages": [
      {
        "role": "user",
        "content": "A slogan for a neighborhood bakery"
      }
    ]
  }'

The response:

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "model": "mistralai/mistral-large",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Fresh bread, right around the corner." },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 9,
    "price": 0.0002,
    "currency": "USD"
  }
}

Streaming

With "stream": true, the answer arrives in chunks (server-sent events), each on a data:line, and ends with data: [DONE]. To get the price, ask for "stream_options": { "include_usage": true }: the last chunk carries the tokens and the amount charged.

data: {"choices":[{"index":0,"delta":{"role":"assistant","content":"Fresh"}}]}

data: {"choices":[{"index":0,"delta":{"content":" bread, right around the corner."}}]}

data: {"choices":[],"usage":{"prompt_tokens":18,"completion_tokens":9,"price":0.0002,"currency":"USD"}}

data: [DONE]

If the connection drops midway, you're only charged for what was already generated.

Authentication

Send the key in the Authorization: Bearer $WIZZYFLOW_API_KEY header. It's the same key as the image, video and audio models. Keep the key in an environment variable, on the server; never in browser code.

Input

Parameters go in the body, as JSON. Only model and messages are required; any others you don't send keep the model's default.

NameTypeWhat it is
modelstringThe model ID.
messagesarrayThe conversation, in order: objects with role (system, user or assistant) and content.
max_tokensintegerMax response length, in tokens. The balance hold is based on it; only what's used is charged.
streambooleantrue to receive the answer in chunks, as it's generated.
stream_optionsobject{ "include_usage": true } to receive the tokens and price in the last chunk.
temperaturenumber0 to 2. Higher gives more varied answers; lower, more predictable ones.
top_pnumber0 to 1. Limits the candidate words to the most likely ones.
frequency_penaltynumberDiscourages repeating the same words.
presence_penaltynumberEncourages new topics.
stopstring or arrayStops generating when it hits one of these strings.
seedintegerSeed for more reproducible answers.
response_formatobject{ "type": "json_object" } or a JSON Schema, to get the answer as JSON.
toolsarrayFunctions the model can ask to call, in the OpenAI format.
tool_choicestring or objectauto, none, required or a specific function.

Output

The response follows the OpenAI format, with the amount charged inside usage.

FieldTypeWhat it is
idstringThe response ID.
modelstringThe model that answered.
choices[0].message.contentstringThe answer.
choices[0].message.reasoningstringThe reasoning, when the model thinks and returns what it thought.
choices[0].message.tool_callsarrayThe functions the model asked to call, when there are tools.
choices[0].finish_reasonstringstop (finished), length (hit max_tokens) or tool_calls.
usage.prompt_tokensintegerInput tokens.
usage.completion_tokensintegerOutput tokens.
usage.pricenumberThe amount charged for this call, in your account's currency.
usage.currencystringBRL or USD: your account's currency.

Pricing

Charged per token, for each call's input and output. Before answering, we hold the most it could cost (the input and max_tokens); at the end, we charge only what was used and return the rest.

Input
$0.00300
Cached input
$0.00030
Output
$0.00900

per 1K tokens

128,000 token context; answers up to 102,400 tokens.

Prices in US dollars.