{
  "openapi": "3.0.3",
  "info": {
    "title": "Flonno API",
    "version": "2026-09-30",
    "description": "OpenAI-compatible API for qwen3.8-27b. Flonno serves this model on its own GPUs. Requests are not routed to another AI API provider. Chat completions accept text and inline images. Requires a scoped Flonno bearer key and funds when prepaid billing is enabled. Only documented endpoints are implemented. Prices and availability may change.",
    "termsOfService": "https://www.flonno.com/terms"
  },
  "servers": [
    {
      "url": "https://www.flonno.com/v1"
    }
  ],
  "security": [
    {
      "flonnoBearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "flonnoBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Flonno API key. Do not put real keys in this document."
      }
    }
  },
  "paths": {
    "/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List models allowed for this key",
        "description": "Requires models:read. Returns model IDs, not pricing or inference locations.",
        "responses": {
          "200": {
            "description": "Available models.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "object",
                    "data"
                  ],
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string"
                          },
                          "created": {
                            "type": "integer"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or unsupported model."
          },
          "401": {
            "description": "Missing, invalid, expired or revoked key."
          },
          "403": {
            "description": "Permission, model access or IP restriction."
          },
          "402": {
            "description": "Insufficient available prepaid credit."
          },
          "429": {
            "description": "Rate limit exceeded."
          },
          "503": {
            "description": "Service or dependency unavailable."
          }
        }
      }
    },
    "/chat/completions": {
      "post": {
        "operationId": "createChatCompletion",
        "summary": "Generate a chat completion",
        "description": "Requires chat:completions and selected model access. Input and output tokens are billable. Messages can include text and inline images. The example below is text. Extra optional fields depend on the gateway and model.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "example": "qwen3.8-27b"
                  },
                  "messages": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "max_tokens": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 128
                  },
                  "stream": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "additionalProperties": true
              },
              "example": {
                "model": "qwen3.8-27b",
                "messages": [
                  {
                    "role": "user",
                    "content": "Give one practical tip for organizing support tickets."
                  }
                ],
                "max_tokens": 128,
                "stream": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chat Completions JSON or an SSE stream.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or unsupported model."
          },
          "401": {
            "description": "Missing, invalid, expired or revoked key."
          },
          "403": {
            "description": "Permission, model access or IP restriction."
          },
          "402": {
            "description": "Insufficient available prepaid credit."
          },
          "429": {
            "description": "Rate limit exceeded."
          },
          "503": {
            "description": "Service or dependency unavailable."
          }
        }
      }
    }
  }
}
