WizzyFlow
Docs menu

chat

Gemini 3.1 Pro

Google LLM, using the OpenAI chat format. Price $0.00075 / 0.0053 per 1K tokens. Prices in US dollars.

Try it in the Playground

OpenAI formatchat

google/gemini-3.1-pro

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": "google/gemini-3.1-pro",
    "messages": [
      {
        "role": "user",
        "content": "A slogan for a neighborhood bakery"
      }
    ]
  }'

The response:

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "model": "google/gemini-3.1-pro",
  "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.

The full parameter list for this model isn't available yet; the ones in the table work on all of them.

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.00075
Cached input
$0.00075
Output
$0.00525

per 1K tokens

Prices in US dollars.