# Flonno API reference

> OpenAI-compatible chat completions. Base URL https://www.flonno.com/v1. Model qwen3.8-27b.

Canonical: https://www.flonno.com/docs · Updated: 2026-11-11

## Quick start

Create an account, verify your email, and open the dashboard for the $1 free credit. No card for that credit. Keep the key on the server.

```sh
export FLONNO_API_KEY='YOUR_FLONNO_KEY'
curl 'https://www.flonno.com/v1/chat/completions' \
  -H "Authorization: Bearer $FLONNO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3.8-27b","messages":[{"role":"user","content":"Classify this note as JSON with the keys category and urgency. Note: The customer cannot reset their password."}],"max_tokens":128,"reasoning_effort":"none","response_format":{"type":"json_object"}}'
```

Read `choices[0].message.content`. Usage is in `usage` when the runtime reports it.

## Authentication

Send `Authorization: Bearer YOUR_FLONNO_KEY`. The secret is shown once. Flonno stores a hash.

- `chat:completions` allows both generation endpoints.
- `models:read` allows model discovery.
- Keys can be limited by model, IP, and expiry, then revoked. Changes apply to the next request.

## GET /v1/models

Returns the models your key may call. This endpoint does not list prices.

```sh
curl https://www.flonno.com/v1/models \
  -H "Authorization: Bearer $FLONNO_API_KEY"
```

## POST /v1/chat/completions

JSON with `model` and `messages`. Input and output share a 131,072-token window. `n` must be 1.

| Field | Behavior |
| --- | --- |
| `model` | Required. qwen3.8-27b. |
| `messages` | Required. 1–100 messages. Text, inline images, and tool history. |
| `max_tokens` | 1–32,768. Default 4,096. Includes reasoning tokens. |
| `stream` | Optional. Server-Sent Events when true. |
| `reasoning_effort` | none, low, medium, or xhigh. Default medium. Not a separate token cap. |
| `tools` | Your functions. tool_choice required is unsupported. You execute the calls. |
| `response_format` | json_object is supported. Check the keys before you use the object. |

To move an existing client, change the base URL and model id. Unsupported OpenAI endpoints stay unsupported. Sampling fields are forwarded when the runtime accepts them.

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["FLONNO_API_KEY"],
    base_url="https://www.flonno.com/v1",
    max_retries=0,
    timeout=120.0,
)

response = client.chat.completions.create(
    model="qwen3.8-27b",
    messages=[{"role": "user", "content": "Classify this note as JSON with the keys category and urgency. Note: The customer cannot reset their password."}],
    max_tokens=128,
    response_format={"type": "json_object"},
    extra_body={"reasoning_effort": "none"},
)
print(response.choices[0].message.content)
```

## Streaming

Set `stream: true` and read the whole SSE response. Text arrives in `choices[0].delta.content`. The stream ends with `data: [DONE]`. Treat a truncated stream as a failure. The gateway timeout is 900 seconds.

```sh
export FLONNO_API_KEY='YOUR_FLONNO_KEY'
curl --no-buffer 'https://www.flonno.com/v1/chat/completions' \
  -H "Authorization: Bearer $FLONNO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3.8-27b","messages":[{"role":"user","content":"Classify this note as JSON with the keys category and urgency. Note: The customer cannot reset their password."}],"max_tokens":128,"reasoning_effort":"none","response_format":{"type":"json_object"},"stream":true}'
```

## Images and tools

Inline PNG, JPEG, or WebP data URLs only: at most four images, 2 MiB each, inside the 4 MiB body. No remote image URLs, audio, or image generation.

If the reply contains `tool_calls`, validate each call, run it in your app, and send the result back with role `tool`. Flonno does not run your tools. `tool_choice: "required"` is rejected. Automatic selection does not guarantee a call.

## POST /v1/messages

An Anthropic Messages subset on the same model, key, price, and limits. It does not serve Claude. Authenticate with `x-api-key` or a bearer token. `max_tokens` is required. Server-hosted Anthropic tools are not supported.

## Limits and billing

| Limit | Account |
| --- | --- |
| Generation | 60 requests / minute, both generation endpoints |
| Model discovery | 120 / minute |
| Concurrent generation | 10 |
| Active keys | 20 |
| JSON body | 4 MiB |
| Context / max output | 131,072 / 32,768 tokens |

New accounts pay $0.05 per million input tokens and $0.80 per million output tokens, including billed reasoning. Cached and uncached input use the same rate. A request reserves credit, then settles on reported usage. These limits are admission limits, not a throughput guarantee.

## Errors

| HTTP | Meaning |
| --- | --- |
| 400 | Invalid JSON, fields, model, or output limit. |
| 401 | Missing, invalid, expired, or revoked key. |
| 402 | The $1 free credit is not on the account yet, or prepaid credit cannot cover this request. |
| 403 | Missing permission, model or IP access, or a payment hold. |
| 413 | Body over 4 MiB. |
| 429 | Rate or concurrency limit. Honor Retry-After. |
| 502 | Inference unreachable or the stream broke. |
| 503 | The service or a dependency is unavailable. |

Gateway errors use an `error` object with `message` and `type`. Check the status before you parse an answer.

## Request content

Prompts, uploaded media, tool content, reasoning, and completions are not logged or stored for training. Prefix caches may keep content in RAM until eviction or restart. Request metadata, including model, time, IP, status, and token counts, is kept for 30 days. Details are in the [privacy notice](https://www.flonno.com/privacy).

## More

- [API reference](https://www.flonno.com/docs.md)
- [Pricing](https://www.flonno.com/pricing.md)
- [Model facts](https://www.flonno.com/models/qwen3-8-flash-27b.md) ([JSON](https://www.flonno.com/models/qwen3-8-flash-27b.json))
- [JSON extraction](https://www.flonno.com/use-cases/json-extraction.md)
- [Coding agents](https://www.flonno.com/coding-agents.md)
- [Machine-readable pricing](https://www.flonno.com/pricing.json)
- [OpenAPI specification](https://www.flonno.com/integrations/openapi.json)
- [Status](https://www.flonno.com/status) ([JSON](https://www.flonno.com/status.json))
- [llms.txt](https://www.flonno.com/llms.txt)
