{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowModels API",
        "version": "v1",
        "description": "Integrate models without a subscription: your own API keys, credit in euros, synchronous and asynchronous responses, and optional Brain context."
    },
    "servers": [
        {
            "url": "https://api.flowmodels.one/v1",
            "description": "FlowModels API v1"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "models",
            "description": "Models"
        },
        {
            "name": "embeddings",
            "description": "Embeddings"
        },
        {
            "name": "rerank",
            "description": "Rerank"
        },
        {
            "name": "audio-transcription",
            "description": "Transcribe audio"
        },
        {
            "name": "video-generation",
            "description": "Generate videos"
        },
        {
            "name": "image-generation",
            "description": "Generate images"
        },
        {
            "name": "decisions",
            "description": "Decisions"
        },
        {
            "name": "chat-completions",
            "description": "Chat Completions"
        },
        {
            "name": "responses",
            "description": "Responses"
        },
        {
            "name": "end-users",
            "description": "End-user management"
        },
        {
            "name": "files",
            "description": "Files as end-user context"
        },
        {
            "name": "workspace-files",
            "description": "Workspace files"
        },
        {
            "name": "memories",
            "description": "Memories"
        },
        {
            "name": "webhooks",
            "description": "Webhooks"
        },
        {
            "name": "billing",
            "description": "Billing and API keys"
        }
    ],
    "paths": {
        "/models": {
            "get": {
                "operationId": "models-list",
                "summary": "List models",
                "description": "Lists the released, priced provider models for your key. The cursor is always the full model identifier.",
                "tags": [
                    "models"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number of entries from 1 to 100, default 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Model identifier from last_id of the previous page",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "groq/openai/gpt-oss-120b",
                                            "object": "model",
                                            "created": 1735000000,
                                            "owned_by": "creativeskyline",
                                            "pricing": {
                                                "prompt": "1",
                                                "completion": "2",
                                                "currency": "EUR",
                                                "unit": "per_million_tokens"
                                            },
                                            "kind": "chat",
                                            "context_length": 131072,
                                            "max_output_tokens": 32768,
                                            "capabilities": {
                                                "reasoning": true,
                                                "reasoning_levels": [
                                                    "low",
                                                    "medium",
                                                    "high"
                                                ],
                                                "web_search": false,
                                                "web_search_forced": false,
                                                "tools": true,
                                                "tool_choice": true,
                                                "parallel_tool_calls": true,
                                                "vision": false,
                                                "json_object": true,
                                                "json_schema": true,
                                                "sampling": true,
                                                "streaming": true
                                            },
                                            "supported_parameters": [
                                                "temperature",
                                                "top_p",
                                                "max_tokens",
                                                "tools",
                                                "tool_choice",
                                                "parallel_tool_calls",
                                                "response_format",
                                                "reasoning_effort",
                                                "stream"
                                            ],
                                            "flowai_limits": {
                                                "input_tokens": 131072,
                                                "max_output_tokens": 32768,
                                                "max_messages": 1000,
                                                "max_payload_bytes": 4194304,
                                                "max_chars_per_message": 1000000
                                            },
                                            "provider_metadata": {
                                                "architecture": null,
                                                "supported_parameters_raw": null
                                            },
                                            "deprecated_at": null,
                                            "data_residency": null
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "groq/openai/gpt-oss-120b",
                                    "last_id": "groq/openai/gpt-oss-120b",
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/models/{model_id}": {
            "get": {
                "operationId": "models-show",
                "summary": "Retrieve a model",
                "description": "Returns a single model entry with prices, capabilities and the FlowModels limits that actually apply.",
                "tags": [
                    "models"
                ],
                "parameters": [
                    {
                        "name": "model_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "groq/openai/gpt-oss-120b",
                                    "object": "model",
                                    "created": 1735000000,
                                    "owned_by": "creativeskyline",
                                    "pricing": {
                                        "prompt": "1",
                                        "completion": "2",
                                        "currency": "EUR",
                                        "unit": "per_million_tokens"
                                    },
                                    "kind": "chat",
                                    "context_length": 131072,
                                    "max_output_tokens": 32768,
                                    "capabilities": {
                                        "reasoning": true,
                                        "reasoning_levels": [
                                            "low",
                                            "medium",
                                            "high"
                                        ],
                                        "web_search": false,
                                        "web_search_forced": false,
                                        "tools": true,
                                        "tool_choice": true,
                                        "parallel_tool_calls": true,
                                        "vision": false,
                                        "json_object": true,
                                        "json_schema": true,
                                        "sampling": true,
                                        "streaming": true
                                    },
                                    "supported_parameters": [
                                        "temperature",
                                        "top_p",
                                        "max_tokens",
                                        "tools",
                                        "tool_choice",
                                        "parallel_tool_calls",
                                        "response_format",
                                        "reasoning_effort",
                                        "stream"
                                    ],
                                    "flowai_limits": {
                                        "input_tokens": 131072,
                                        "max_output_tokens": 32768,
                                        "max_messages": 1000,
                                        "max_payload_bytes": 4194304,
                                        "max_chars_per_message": 1000000
                                    },
                                    "provider_metadata": {
                                        "architecture": null,
                                        "supported_parameters_raw": null
                                    },
                                    "deprecated_at": null,
                                    "data_residency": null,
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/embeddings": {
            "post": {
                "operationId": "embeddings-create",
                "summary": "Create vectors",
                "description": "Creates embedding vectors for a string or a batch of strings.",
                "tags": [
                    "embeddings"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "object": "embedding",
                                            "embedding": [
                                                0.0023,
                                                -0.0091
                                            ],
                                            "index": 0
                                        },
                                        {
                                            "object": "embedding",
                                            "embedding": [
                                                0.0114,
                                                0.0072
                                            ],
                                            "index": 1
                                        }
                                    ],
                                    "model": "openai/text-embedding-3-small",
                                    "usage": {
                                        "prompt_tokens": 8,
                                        "total_tokens": 8,
                                        "cost": "0.000004",
                                        "currency": "EUR"
                                    },
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Identifier of a released embedding model in the format provider/model-id"
                                    },
                                    "input": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "array",
                                                "items": []
                                            }
                                        ],
                                        "description": "A string or up to 2,048 strings of at most 8,192 characters each"
                                    },
                                    "encoding_format": {
                                        "type": "string",
                                        "description": "float (default) or base64 for little-endian Float32"
                                    },
                                    "dimensions": {
                                        "type": "integer",
                                        "description": "Desired vector length, if the model supports it: bge-m3 only 1024, Qwen3-VL-Embedding-8B 1 to 4096"
                                    },
                                    "user": {
                                        "type": "string",
                                        "description": "Your own identifier of the calling end user for abuse tracing"
                                    }
                                },
                                "required": [
                                    "model",
                                    "input"
                                ]
                            },
                            "example": {
                                "model": "openai/text-embedding-3-small",
                                "input": [
                                    "First text",
                                    "Second text"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/rerank": {
            "post": {
                "operationId": "rerank-create",
                "summary": "Score documents",
                "description": "Scores documents by their relevance to a query and returns them in descending order.",
                "tags": [
                    "rerank"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "01HXYZ",
                                    "object": "rerank",
                                    "model": "ionos/Qwen/Qwen3-VL-Reranker-8B",
                                    "results": [
                                        {
                                            "index": 1,
                                            "relevance_score": 0.6072,
                                            "document": {
                                                "text": "Berlin is the capital of Germany."
                                            }
                                        }
                                    ],
                                    "usage": {
                                        "prompt_tokens": 162,
                                        "total_tokens": 162,
                                        "cost": "0.000009",
                                        "currency": "EUR"
                                    },
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Identifier of a released rerank model in the format provider/model-id, currently ionos/Qwen/Qwen3-VL-Reranker-8B"
                                    },
                                    "query": {
                                        "type": "string",
                                        "description": "The query, not empty, at most 8,192 characters"
                                    },
                                    "documents": {
                                        "type": "array",
                                        "items": [],
                                        "description": "1 to 1,000 non-empty strings of at most 32,768 characters each, at most 1,000,000 characters in total"
                                    },
                                    "top_n": {
                                        "type": "integer",
                                        "description": "Number of best results, at most the number of documents; 0 or no value returns all of them"
                                    },
                                    "return_documents": {
                                        "type": "boolean",
                                        "description": "true adds document.text with the document to every result (default false)"
                                    }
                                },
                                "required": [
                                    "model",
                                    "query",
                                    "documents"
                                ]
                            },
                            "example": {
                                "model": "ionos/Qwen/Qwen3-VL-Reranker-8B",
                                "query": "What is the capital of Germany?",
                                "documents": [
                                    "Paris is the capital of France.",
                                    "Berlin is the capital of Germany."
                                ],
                                "top_n": 1,
                                "return_documents": true
                            }
                        }
                    }
                }
            }
        },
        "/audio/transcriptions": {
            "post": {
                "operationId": "audio-post-transcriptions",
                "summary": "Transcribe a file",
                "description": "Transcribe a file. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription",
                                    "model": "groq/whisper-large-v3-turbo",
                                    "status": "queued",
                                    "text": "",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 0
                                    },
                                    "error": null,
                                    "expires_at": null,
                                    "progress": 0
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription",
                                    "model": "groq/whisper-large-v3-turbo",
                                    "status": "queued",
                                    "text": "",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 0
                                    },
                                    "error": null,
                                    "expires_at": null,
                                    "progress": 0
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Released identifier provider/model-id from GET /models"
                                    },
                                    "language": {
                                        "type": "string",
                                        "description": "Model-dependent language code, for example de"
                                    },
                                    "timestamps": {
                                        "type": "boolean",
                                        "description": "Explicitly enable timestamps; default false"
                                    },
                                    "diarize": {
                                        "type": "boolean",
                                        "description": "Speaker attribution; no model currently offers it, so true is rejected with HTTP 422. Default false"
                                    },
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Audio file, at most 200 MiB and eight hours; observe the model limits"
                                    },
                                    "background": {
                                        "type": "boolean",
                                        "description": "Required above 24 MiB or ten minutes. Response 202 with a job ID."
                                    }
                                },
                                "required": [
                                    "model",
                                    "file"
                                ]
                            },
                            "example": []
                        }
                    }
                }
            }
        },
        "/audio/transcriptions/{id}": {
            "get": {
                "operationId": "audio-get-transcriptions-id",
                "summary": "Retrieve a job",
                "description": "Retrieve a job. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription",
                                    "model": "groq/whisper-large-v3-turbo",
                                    "status": "completed",
                                    "text": "Good day.",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 2
                                    },
                                    "error": null,
                                    "expires_at": "2026-09-23T12:00:00+00:00",
                                    "progress": 1
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "audio-delete-transcriptions-id",
                "summary": "Delete a completed job",
                "description": "Delete a completed job. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "deleted": true
                                }
                            }
                        }
                    }
                }
            }
        },
        "/audio/transcriptions/{id}/cancel": {
            "post": {
                "operationId": "audio-post-transcriptions-id-cancel",
                "summary": "Cancel a job",
                "description": "Cancel a job. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription",
                                    "model": "groq/whisper-large-v3-turbo",
                                    "status": "cancelled",
                                    "text": "Good day.",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 2
                                    },
                                    "error": null,
                                    "expires_at": "2026-09-23T12:00:00+00:00",
                                    "progress": 1
                                }
                            }
                        }
                    }
                }
            }
        },
        "/audio/transcription-sessions": {
            "post": {
                "operationId": "audio-post-transcription-sessions",
                "summary": "Create a live session",
                "description": "Create a live session. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription_session",
                                    "model": "openai/gpt-live-transcribe",
                                    "status": "waiting",
                                    "text": "",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 0
                                    },
                                    "error": null,
                                    "expires_at": null,
                                    "segments": [],
                                    "next_after_sequence": 0,
                                    "last_sequence": 0,
                                    "ticket": "0000000000000000000000000000000000000000000000000000000000000000",
                                    "ticket_expires_at": "2026-09-22T12:01:00+00:00",
                                    "websocket_url": "wss://example.invalid/api/flowai/v1/audio/transcription-sessions/c7a58c7e-d155-4268-929f-9910c866f9d8/stream"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Released identifier provider/model-id from GET /models"
                                    },
                                    "language": {
                                        "type": "string",
                                        "description": "Model-dependent language code, for example de"
                                    },
                                    "timestamps": {
                                        "type": "boolean",
                                        "description": "Explicitly enable timestamps; default false"
                                    },
                                    "diarize": {
                                        "type": "boolean",
                                        "description": "Speaker attribution; no model currently offers it, so true is rejected with HTTP 422. Default false"
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "push for apps or url for direct HTTP(S) audio streams"
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Required with source=url. No private targets, credentials or HLS playlists."
                                    },
                                    "max_seconds": {
                                        "type": "integer",
                                        "description": "Default 7200, at most 28800 seconds"
                                    }
                                },
                                "required": [
                                    "model",
                                    "source"
                                ]
                            },
                            "example": {
                                "model": "openai/gpt-live-transcribe",
                                "source": "push",
                                "language": "de"
                            }
                        }
                    }
                }
            }
        },
        "/audio/transcription-sessions/{id}": {
            "get": {
                "operationId": "audio-get-transcription-sessions-id",
                "summary": "Retrieve a session and confirmed segments",
                "description": "Retrieve a session and confirmed segments. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "after_sequence",
                        "in": "query",
                        "required": false,
                        "description": "Retrieve only later confirmed segments, at most 1000 per page",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription_session",
                                    "model": "openai/gpt-live-transcribe",
                                    "status": "completed",
                                    "text": "Good day.",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 2
                                    },
                                    "error": null,
                                    "expires_at": "2026-09-23T12:00:00+00:00",
                                    "segments": [
                                        {
                                            "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                            "sequence": 1,
                                            "text": "Good day."
                                        }
                                    ],
                                    "next_after_sequence": 1,
                                    "last_sequence": 1
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "audio-delete-transcription-sessions-id",
                "summary": "Delete a completed session",
                "description": "Delete a completed session. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "deleted": true
                                }
                            }
                        }
                    }
                }
            }
        },
        "/audio/transcription-sessions/{id}/connection-ticket": {
            "post": {
                "operationId": "audio-post-transcription-sessions-id-connection-ticket",
                "summary": "Request a new connection ticket",
                "description": "Request a new connection ticket. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "ticket": "0000000000000000000000000000000000000000000000000000000000000000",
                                    "ticket_expires_at": "2026-09-22T12:01:00+00:00",
                                    "websocket_url": "wss://example.invalid/api/flowai/v1/audio/transcription-sessions/c7a58c7e-d155-4268-929f-9910c866f9d8/stream"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/audio/transcription-sessions/{id}/stop": {
            "post": {
                "operationId": "audio-post-transcription-sessions-id-stop",
                "summary": "End the recording and finish the results",
                "description": "End the recording and finish the results. A FlowModels key is required. Finished results stay available for 24 hours after completion.",
                "tags": [
                    "audio-transcription"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "audio.transcription_session",
                                    "model": "openai/gpt-live-transcribe",
                                    "status": "completed",
                                    "text": "Good day.",
                                    "flowai_request_id": "request-id",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "audio_seconds": 2
                                    },
                                    "error": null,
                                    "expires_at": "2026-09-23T12:00:00+00:00",
                                    "segments": [
                                        {
                                            "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                            "sequence": 1,
                                            "text": "Good day."
                                        }
                                    ],
                                    "next_after_sequence": 1,
                                    "last_sequence": 1
                                }
                            }
                        }
                    }
                }
            }
        },
        "/videos": {
            "post": {
                "operationId": "videos-create",
                "summary": "Create a video",
                "description": "Create a video. A FlowModels key is required.",
                "tags": [
                    "video-generation"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "video",
                                    "model": "bytedance/seedance-2.5/text-to-video",
                                    "status": "queued",
                                    "parameters": {
                                        "duration": 5,
                                        "resolution": "720p",
                                        "aspect_ratio": "16:9",
                                        "output_format": "mp4",
                                        "generate_audio": true
                                    },
                                    "seconds": 5,
                                    "content_url": null,
                                    "content_type": null,
                                    "size_bytes": null,
                                    "error": null,
                                    "created_at": "2026-11-08T12:00:00+00:00",
                                    "completed_at": null,
                                    "expires_at": null,
                                    "flowai_request_id": "01HXYZ…ULID",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "seconds": 5
                                    }
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Released identifier from GET /models, for example bytedance/seedance-2.5/text-to-video"
                                    },
                                    "prompt": {
                                        "type": "string",
                                        "description": "Required for all text-to-video models and for MiniMax and Wan image-to-video, optional for Seedance image-to-video. At most 7,000 characters."
                                    },
                                    "image_url": {
                                        "type": "string",
                                        "description": "Required for image-to-video unless image_file_id is set: https URL or data:image/...;base64 URL. JPEG, PNG, WebP or GIF, at most 10 MiB."
                                    },
                                    "image_file_id": {
                                        "type": "string",
                                        "description": "file_id of an image file this team uploaded earlier, instead of image_url"
                                    },
                                    "end_image_url": {
                                        "type": "string",
                                        "description": "End image, image-to-video models only. Same formats as image_url."
                                    },
                                    "end_image_file_id": {
                                        "type": "string",
                                        "description": "file_id of the end image, instead of end_image_url"
                                    },
                                    "duration": {
                                        "type": "integer",
                                        "description": "Duration in seconds, range per model, see table. Default 5."
                                    },
                                    "resolution": {
                                        "type": "string",
                                        "description": "Resolution per model, see table"
                                    },
                                    "aspect_ratio": {
                                        "type": "string",
                                        "description": "Aspect ratio per model. Seedance image-to-video rejects this field."
                                    },
                                    "generate_audio": {
                                        "type": "boolean",
                                        "description": "Generate audio. Seedance and Wan only, default true."
                                    },
                                    "output_format": {
                                        "type": "string",
                                        "description": "mp4 or mov. Seedance text-to-video only."
                                    },
                                    "enable_thinking": {
                                        "type": "boolean",
                                        "description": "Wan only, default false. Has its own price per second."
                                    },
                                    "seed": {
                                        "type": "integer",
                                        "description": "Wan only, 0 to 2147483647"
                                    },
                                    "aigc_watermark": {
                                        "type": "boolean",
                                        "description": "MiniMax only, default false"
                                    }
                                },
                                "required": [
                                    "model"
                                ]
                            },
                            "example": {
                                "model": "bytedance/seedance-2.5/text-to-video",
                                "prompt": "A paper boat on a calm lake at sunrise",
                                "duration": 5,
                                "resolution": "720p"
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "videos-list",
                "summary": "List videos",
                "description": "List videos. A FlowModels key is required.",
                "tags": [
                    "video-generation"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, default 20, at most 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "last_id of the previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "queued, in_progress, completed, failed or cancelled",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                            "object": "video",
                                            "model": "bytedance/seedance-2.5/text-to-video",
                                            "status": "completed",
                                            "parameters": {
                                                "duration": 5,
                                                "resolution": "720p",
                                                "aspect_ratio": "16:9",
                                                "output_format": "mp4",
                                                "generate_audio": true
                                            },
                                            "seconds": 5,
                                            "content_url": "https://example.invalid/api/flowai/v1/videos/c7a58c7e-d155-4268-929f-9910c866f9d8/content",
                                            "content_type": "video/mp4",
                                            "size_bytes": 18204311,
                                            "error": null,
                                            "created_at": "2026-11-08T12:00:00+00:00",
                                            "completed_at": "2026-11-08T12:04:10+00:00",
                                            "expires_at": "2026-11-15T12:04:10+00:00",
                                            "flowai_request_id": "01HXYZ…ULID"
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "last_id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/videos/{id}": {
            "get": {
                "operationId": "videos-show",
                "summary": "Retrieve a video",
                "description": "Retrieve a video. A FlowModels key is required.",
                "tags": [
                    "video-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "video",
                                    "model": "bytedance/seedance-2.5/text-to-video",
                                    "status": "completed",
                                    "parameters": {
                                        "duration": 5,
                                        "resolution": "720p",
                                        "aspect_ratio": "16:9",
                                        "output_format": "mp4",
                                        "generate_audio": true
                                    },
                                    "seconds": 5,
                                    "content_url": "https://example.invalid/api/flowai/v1/videos/c7a58c7e-d155-4268-929f-9910c866f9d8/content",
                                    "content_type": "video/mp4",
                                    "size_bytes": 18204311,
                                    "error": null,
                                    "created_at": "2026-11-08T12:00:00+00:00",
                                    "completed_at": "2026-11-08T12:04:10+00:00",
                                    "expires_at": "2026-11-15T12:04:10+00:00",
                                    "flowai_request_id": "01HXYZ…ULID",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.812500",
                                        "cost_micro_eur": 812500,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "seconds": 5
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "videos-delete",
                "summary": "Delete a video",
                "description": "Delete a video. A FlowModels key is required.",
                "tags": [
                    "video-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "video",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/videos/{id}/content": {
            "get": {
                "operationId": "videos-content",
                "summary": "Download the finished video",
                "description": "Download the finished video. A FlowModels key is required.",
                "tags": [
                    "video-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "302": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/videos/{id}/cancel": {
            "post": {
                "operationId": "videos-cancel",
                "summary": "Cancel a video",
                "description": "Cancel a video. A FlowModels key is required.",
                "tags": [
                    "video-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "video",
                                    "model": "bytedance/seedance-2.5/text-to-video",
                                    "status": "cancelled",
                                    "parameters": {
                                        "duration": 5,
                                        "resolution": "720p",
                                        "aspect_ratio": "16:9",
                                        "output_format": "mp4",
                                        "generate_audio": true
                                    },
                                    "seconds": 5,
                                    "content_url": null,
                                    "content_type": null,
                                    "size_bytes": null,
                                    "error": null,
                                    "created_at": "2026-11-08T12:00:00+00:00",
                                    "completed_at": "2026-11-08T12:00:30+00:00",
                                    "expires_at": "2026-11-15T12:00:30+00:00",
                                    "flowai_request_id": "01HXYZ…ULID",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "seconds": 5
                                    }
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "c7a58c7e-d155-4268-929f-9910c866f9d8",
                                    "object": "video",
                                    "model": "bytedance/seedance-2.5/text-to-video",
                                    "status": "cancelled",
                                    "parameters": {
                                        "duration": 5,
                                        "resolution": "720p",
                                        "aspect_ratio": "16:9",
                                        "output_format": "mp4",
                                        "generate_audio": true
                                    },
                                    "seconds": 5,
                                    "content_url": null,
                                    "content_type": null,
                                    "size_bytes": null,
                                    "error": null,
                                    "created_at": "2026-11-08T12:00:00+00:00",
                                    "completed_at": "2026-11-08T12:00:30+00:00",
                                    "expires_at": "2026-11-15T12:00:30+00:00",
                                    "flowai_request_id": "01HXYZ…ULID",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.000000",
                                        "cost_micro_eur": 0,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "seconds": 5
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/images/generations": {
            "post": {
                "operationId": "images-generate",
                "summary": "Generate an image",
                "description": "Generate an image. A FlowModels key is required.",
                "tags": [
                    "image-generation"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10",
                                    "object": "image",
                                    "created": 1794830400,
                                    "model": "openai/gpt-image-2.6-sunburst",
                                    "status": "completed",
                                    "parameters": {
                                        "size": "square",
                                        "quality": "low"
                                    },
                                    "data": [
                                        {
                                            "url": "https://example.invalid/api/flowai/v1/images/5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10/content"
                                        }
                                    ],
                                    "content_url": "https://example.invalid/api/flowai/v1/images/5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10/content",
                                    "content_type": "image/png",
                                    "size_bytes": 1482113,
                                    "error": null,
                                    "created_at": "2026-11-12T12:00:00+00:00",
                                    "completed_at": "2026-11-12T12:00:09+00:00",
                                    "expires_at": "2026-11-19T12:00:09+00:00",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.006450",
                                        "cost_micro_eur": 6450,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "images": 1
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Released identifier from GET /models, for example openai/gpt-image-2.6-sunburst"
                                    },
                                    "prompt": {
                                        "type": "string",
                                        "description": "Description of the image, at most 4,000 characters"
                                    },
                                    "size": {
                                        "type": "string",
                                        "description": "square, portrait, landscape or 2k. Default square."
                                    },
                                    "quality": {
                                        "type": "string",
                                        "description": "low or medium for openai/gpt-image-2.6-sunburst (default low), only medium for google/gemini-3.1-flash-image, google/gemini-nano-banana-2.1, minimax/h3-image, minimax/h3-image-highspeed and ionos/black-forest-labs/FLUX.2-klein-4B"
                                    },
                                    "n": {
                                        "type": "integer",
                                        "description": "Number of images, only 1 is allowed"
                                    },
                                    "response_format": {
                                        "type": "string",
                                        "description": "url (default) or b64_json"
                                    }
                                },
                                "required": [
                                    "model",
                                    "prompt"
                                ]
                            },
                            "example": {
                                "model": "openai/gpt-image-2.6-sunburst",
                                "prompt": "A paper boat on a calm lake at sunrise",
                                "size": "landscape",
                                "quality": "low"
                            }
                        }
                    }
                }
            }
        },
        "/images/edits": {
            "post": {
                "operationId": "images-edit",
                "summary": "Edit an image",
                "description": "Edit an image. A FlowModels key is required.",
                "tags": [
                    "image-generation"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10",
                                    "object": "image",
                                    "created": 1794830400,
                                    "model": "openai/gpt-image-2.6-sunburst",
                                    "status": "completed",
                                    "parameters": {
                                        "size": "square",
                                        "quality": "low"
                                    },
                                    "data": [
                                        {
                                            "url": "https://example.invalid/api/flowai/v1/images/5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10/content"
                                        }
                                    ],
                                    "content_url": "https://example.invalid/api/flowai/v1/images/5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10/content",
                                    "content_type": "image/png",
                                    "size_bytes": 1482113,
                                    "error": null,
                                    "created_at": "2026-11-12T12:00:00+00:00",
                                    "completed_at": "2026-11-12T12:00:09+00:00",
                                    "expires_at": "2026-11-19T12:00:09+00:00",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.006450",
                                        "cost_micro_eur": 6450,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "images": 1
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Released identifier from GET /models, for example openai/gpt-image-2.6-sunburst"
                                    },
                                    "prompt": {
                                        "type": "string",
                                        "description": "Description of the image, at most 4,000 characters"
                                    },
                                    "size": {
                                        "type": "string",
                                        "description": "square, portrait, landscape or 2k. Default square."
                                    },
                                    "quality": {
                                        "type": "string",
                                        "description": "low or medium for openai/gpt-image-2.6-sunburst (default low), only medium for google/gemini-3.1-flash-image, google/gemini-nano-banana-2.1, minimax/h3-image, minimax/h3-image-highspeed and ionos/black-forest-labs/FLUX.2-klein-4B"
                                    },
                                    "n": {
                                        "type": "integer",
                                        "description": "Number of images, only 1 is allowed"
                                    },
                                    "response_format": {
                                        "type": "string",
                                        "description": "url (default) or b64_json"
                                    },
                                    "image_url": {
                                        "type": "string",
                                        "description": "Image to edit, unless image_file_id is set: https URL or data:image/...;base64 URL. JPEG, PNG or WebP, at most 10 MiB."
                                    },
                                    "image_file_id": {
                                        "type": "string",
                                        "description": "file_id of an image file this team uploaded earlier, instead of image_url"
                                    }
                                },
                                "required": [
                                    "model",
                                    "prompt"
                                ]
                            },
                            "example": {
                                "model": "openai/gpt-image-2.6-sunburst",
                                "prompt": "Mach daraus eine Nachtszene mit Laternen",
                                "image_url": "https://example.com/boot.png"
                            }
                        }
                    }
                }
            }
        },
        "/images/{id}": {
            "get": {
                "operationId": "images-show",
                "summary": "Retrieve an image",
                "description": "Retrieve an image. A FlowModels key is required.",
                "tags": [
                    "image-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10",
                                    "object": "image",
                                    "created": 1794830400,
                                    "model": "openai/gpt-image-2.6-sunburst",
                                    "status": "completed",
                                    "parameters": {
                                        "size": "square",
                                        "quality": "low"
                                    },
                                    "data": [
                                        {
                                            "url": "https://example.invalid/api/flowai/v1/images/5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10/content"
                                        }
                                    ],
                                    "content_url": "https://example.invalid/api/flowai/v1/images/5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10/content",
                                    "content_type": "image/png",
                                    "size_bytes": 1482113,
                                    "error": null,
                                    "created_at": "2026-11-12T12:00:00+00:00",
                                    "completed_at": "2026-11-12T12:00:09+00:00",
                                    "expires_at": "2026-11-19T12:00:09+00:00",
                                    "usage": {
                                        "currency": "EUR",
                                        "cost": "0.006450",
                                        "cost_micro_eur": 6450,
                                        "prompt_tokens": 0,
                                        "completion_tokens": 0,
                                        "total_tokens": 0,
                                        "images": 1
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "images-delete",
                "summary": "Delete an image",
                "description": "Delete an image. A FlowModels key is required.",
                "tags": [
                    "image-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "5b0f3c1e-8a7d-4e52-9c41-2f6d8b9a7e10",
                                    "object": "image",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/images/{id}/content": {
            "get": {
                "operationId": "images-content",
                "summary": "Download the image",
                "description": "Download the image. A FlowModels key is required.",
                "tags": [
                    "image-generation"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "302": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/decisions": {
            "post": {
                "operationId": "decisions-create",
                "summary": "Ask for decisions",
                "description": "Answer typed questions about shared content. A FlowModels key is required.",
                "tags": [
                    "decisions"
                ],
                "responses": {
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "decision",
                                    "model": "typesafe/jev-latest",
                                    "answers": [
                                        {
                                            "type": "predicate",
                                            "name": "doppelte_abbuchung",
                                            "probability": 0.97
                                        },
                                        {
                                            "type": "choice",
                                            "name": "abteilung",
                                            "choice": "buchhaltung",
                                            "probabilities": [
                                                {
                                                    "value": "buchhaltung",
                                                    "probability": 0.94
                                                },
                                                {
                                                    "value": "technik",
                                                    "probability": 0.06
                                                }
                                            ],
                                            "confidence": 0.9
                                        },
                                        {
                                            "type": "score",
                                            "name": "dringlichkeit",
                                            "score": 1.2,
                                            "probabilities": [
                                                {
                                                    "value": 0,
                                                    "label": "Kann warten",
                                                    "probability": 0.15
                                                },
                                                {
                                                    "value": 1,
                                                    "label": "Diese Woche",
                                                    "probability": 0.5
                                                },
                                                {
                                                    "value": 2,
                                                    "label": "Heute",
                                                    "probability": 0.35
                                                }
                                            ],
                                            "confidence": 0.6
                                        }
                                    ],
                                    "usage": {
                                        "input_tokens": 180,
                                        "input_tokens_details": {
                                            "cached_tokens": 0,
                                            "cache_write_tokens": 0
                                        },
                                        "output_tokens": 14,
                                        "cost": "0.000008",
                                        "cost_micro_eur": 8,
                                        "cost_status": "settled",
                                        "currency": "EUR"
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "openai/decisions/gpt-6-luna, typesafe/jev-1.14.0 or typesafe/jev-latest (see GET /models, kind decision)"
                                    },
                                    "input": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "array",
                                                "items": []
                                            }
                                        ],
                                        "description": "Shared content for all questions: a string or a list of messages with role (user, developer, system) and content. user messages allow the parts input_text, input_image (image_url as https or data URL) and input_json (data); developer and system messages allow input_text only."
                                    },
                                    "questions": {
                                        "type": "array",
                                        "items": [],
                                        "description": "1 to 400 questions (fewer depending on the model), each with type (predicate, choice, score, box), a unique name and instructions (string or list of input_text and input_image). choice needs choices [{value, description}] with 2 to 255 unique entries, score needs levels [{label, description}] with 2 to 10 levels from low to high. description is optional in both; a short description is recommended."
                                    },
                                    "prompt_cache_key": {
                                        "type": "string",
                                        "description": "openai/decisions/gpt-6-luna only: key that partitions prompt cache reuse"
                                    }
                                },
                                "required": [
                                    "model",
                                    "input",
                                    "questions"
                                ]
                            },
                            "example": {
                                "model": "typesafe/jev-latest",
                                "input": "Mir wurde das Abo diesen Monat doppelt berechnet. Bitte erstattet den zweiten Betrag.",
                                "questions": [
                                    {
                                        "type": "predicate",
                                        "name": "doppelte_abbuchung",
                                        "instructions": "Beschreibt die Nachricht eine doppelte Abbuchung?"
                                    },
                                    {
                                        "type": "choice",
                                        "name": "abteilung",
                                        "instructions": "Welche Abteilung ist zuständig?",
                                        "choices": [
                                            {
                                                "value": "buchhaltung",
                                                "description": "Zahlungen und Erstattungen"
                                            },
                                            {
                                                "value": "technik",
                                                "description": "Fehler und Störungen"
                                            }
                                        ]
                                    },
                                    {
                                        "type": "score",
                                        "name": "dringlichkeit",
                                        "instructions": "Wie dringend ist die Nachricht?",
                                        "levels": [
                                            {
                                                "label": "Kann warten",
                                                "description": "Keine Frist"
                                            },
                                            {
                                                "label": "Diese Woche",
                                                "description": "Sollte bald bearbeitet werden"
                                            },
                                            {
                                                "label": "Heute",
                                                "description": "Sofort bearbeiten"
                                            }
                                        ]
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/chat/completions": {
            "post": {
                "operationId": "chat-non-stream",
                "summary": "Chat Completions",
                "description": "Sends messages to a released provider model. Without an end-user identifier, the client manages the history; with one, Brain adds the personal context.",
                "tags": [
                    "chat-completions"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "chatcmpl-01HXYZ",
                                    "object": "chat.completion",
                                    "created": 1735000000,
                                    "model": "groq/openai/gpt-oss-120b",
                                    "choices": [
                                        {
                                            "index": 0,
                                            "message": {
                                                "role": "assistant",
                                                "content": "Clear planning makes goals, tasks and deadlines easy to follow."
                                            },
                                            "finish_reason": "stop"
                                        }
                                    ],
                                    "usage": {
                                        "prompt_tokens": 42,
                                        "completion_tokens": 24,
                                        "total_tokens": 66,
                                        "cost": "0.000090",
                                        "currency": "EUR"
                                    },
                                    "flowai_request_id": "01HXYZ"
                                }
                            },
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "data: {\"id\":\"chatcmpl-018f1234-5678-7abc-9def-0123456789ab\",\"object\":\"chat.completion.chunk\",\"model\":\"groq/openai/gpt-oss-120b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Clear goals help.\"},\"finish_reason\":null}]}\n\ndata: [DONE]\n\n"
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Full identifier from GET /models in the format provider/model-id"
                                    },
                                    "external_identifier": {
                                        "type": "string",
                                        "description": "Enables Brain context for your stable end-user identifier of 1 to 255 characters, sent in the JSON body"
                                    },
                                    "messages": {
                                        "type": "array",
                                        "items": [],
                                        "description": "New messages with role and content; at least one non-empty user message"
                                    },
                                    "conversation": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "UUID from the previous response of the same end user; omit it for a new conversation"
                                    },
                                    "max_tokens": {
                                        "type": "integer",
                                        "description": "Upper limit for the output, 1 to 128,000. Without a value the model's maximum applies; if none is stored for the model, 4,096 tokens apply. null counts as no value. OpenAI models accept at least 16 tokens; a smaller value is rejected with 400"
                                    },
                                    "stream": {
                                        "type": "boolean",
                                        "description": "true returns Chat Completions chunks as SSE; default false"
                                    },
                                    "context_compression": {
                                        "type": "boolean",
                                        "description": "Allows FlowModels to summarise an overly long history you sent yourself, server-side; default false. Without it, an overly long history is rejected with 400 context_length_exceeded rather than truncated. The summary is an additional paid model call and is reported in usage.flowai.compression"
                                    },
                                    "reasoning_effort": {
                                        "type": "string",
                                        "description": "Reasoning depth of the model: none, minimal, low, medium, high, xhigh or max. Without a value the provider default applies, so no reasoning budget you did not ask for is incurred. Which levels a model accepts is listed in capabilities.reasoning_levels from GET /models; an unsupported level is rejected with HTTP 400 and unsupported_for_model"
                                    },
                                    "web_search": {
                                        "type": "boolean",
                                        "description": "Turns on the provider's native web search. Off by default, because every search is billed additionally. Models without native search reject true; models with built-in search (Perplexity, Groq Compound) reject false, in both cases with HTTP 400 and unsupported_for_model. The web_search and web_search_forced fields in GET /models are authoritative"
                                    },
                                    "response_format": {
                                        "type": "object",
                                        "description": "Output shape: {\"type\":\"text\"}, {\"type\":\"json_object\"} or {\"type\":\"json_schema\",\"json_schema\":{\"name\":…,\"schema\":…,\"strict\":…}}. The json_object and json_schema fields in GET /models state what the model supports natively; without the capability the API answers HTTP 400 and unsupported_for_model instead of silently returning plain text. With json_object, FlowModels adds a short JSON hint if the word json appears in no message, because some providers reject JSON mode otherwise. With json_schema, strict: false applies unless you send strict. If the provider still rejects the schema, the API answers HTTP 400, invalid_field_value and param response_format"
                                    },
                                    "tools": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Your own functions in the format [{\"type\":\"function\",\"function\":{\"name\":…,\"description\":…,\"parameters\":<JSON Schema>}}]. At most 128 entries, each description at most 65,536 characters, each schema at most 65,536 bytes as JSON. FlowModels does not execute these functions: the model answers with tool_calls, you run the function in your own system and send the result back as a message with role \"tool\". Whether a model accepts functions is listed in tools from GET /models; without the capability the API answers HTTP 400 and unsupported_for_model. Combining it with flowai_tools is not allowed and is rejected with HTTP 400 and invalid_field_value"
                                    },
                                    "tool_choice": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "object"
                                            }
                                        ],
                                        "description": "Controls tool selection: \"auto\", \"none\", \"required\" or {\"type\":\"function\",\"function\":{\"name\":…}} for exactly one function. Only allowed together with tools, and the named function must exist in tools. Without a value the provider default applies"
                                    },
                                    "parallel_tool_calls": {
                                        "type": "boolean",
                                        "description": "Allows or forbids several function calls in one response. Only allowed together with tools. Not every model has this switch; parallel_tool_calls in GET /models is authoritative, otherwise the API answers HTTP 400 and unsupported_for_model"
                                    },
                                    "max_completion_tokens": {
                                        "type": "integer",
                                        "description": "The same setting as max_tokens under the name used by the Responses API. Sending both with different values is rejected"
                                    },
                                    "stream_options": {
                                        "type": "object",
                                        "description": "Accepts include_usage only and requires stream: true. With include_usage: true a final chunk reports the usage of the streamed response"
                                    },
                                    "user": {
                                        "type": "string",
                                        "description": "Your own identifier of the calling end user for abuse tracing, up to 128 characters. It does not replace external_identifier and does not enable Brain context"
                                    },
                                    "search_domain_filter": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Restricts native web search to up to 20 domains, for example [\"company.de\"], or excludes them with a leading minus sign, for example [\"-reddit.com\"]. Either allowed domains only or exclusions only; domains without https:// and without a path, subdomains are included. The field turns on web search and is billed additionally. How many domains a model accepts is listed in GET /models under capabilities.web_search_domain_filter_max (xAI 5, otherwise 20); models without a domain filter such as Gemini reject the field with 400 unsupported_for_model"
                                    }
                                },
                                "required": [
                                    "model",
                                    "messages"
                                ]
                            },
                            "example": {
                                "model": "groq/openai/gpt-oss-120b",
                                "messages": [
                                    {
                                        "role": "user",
                                        "content": "Summarize the benefits of clear project planning."
                                    }
                                ],
                                "max_tokens": 512,
                                "stream": false
                            }
                        }
                    }
                }
            }
        },
        "/responses": {
            "post": {
                "operationId": "responses-create",
                "summary": "Responses",
                "description": "Alternative with input instead of messages, synchronous, as SSE or in the background. An end-user identifier optionally adds Brain context.",
                "tags": [
                    "responses"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "resp_01HXYZ",
                                    "object": "response",
                                    "created_at": 1735000000,
                                    "status": "completed",
                                    "model": "groq/openai/gpt-oss-120b",
                                    "conversation": "018f1234-5678-7abc-9def-0123456789ab",
                                    "output": [
                                        {
                                            "type": "message",
                                            "role": "assistant",
                                            "content": [
                                                {
                                                    "type": "output_text",
                                                    "text": "Clear planning makes goals, tasks and deadlines easy to follow."
                                                }
                                            ]
                                        }
                                    ],
                                    "usage": {
                                        "input_tokens": 42,
                                        "output_tokens": 24,
                                        "total_tokens": 66,
                                        "cost": "0.000090",
                                        "currency": "EUR"
                                    },
                                    "flowai_request_id": "01HXYZ"
                                }
                            },
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "id: 5\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_example\",\"output_index\":0,\"content_index\":0,\"delta\":\"Clear goals help.\"}\n\n"
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model": {
                                        "type": "string",
                                        "description": "Full identifier from GET /models in the format provider/model-id"
                                    },
                                    "external_identifier": {
                                        "type": "string",
                                        "description": "Enables Brain context for your stable end-user identifier of 1 to 255 characters, sent in the JSON body"
                                    },
                                    "input": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "array",
                                                "items": []
                                            }
                                        ],
                                        "description": "New user message as text or a supported message structure"
                                    },
                                    "conversation": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "UUID from the previous response of the same end user; omit it for a new conversation"
                                    },
                                    "stream": {
                                        "type": "boolean",
                                        "description": "Receive response events as SSE; can also be combined with background"
                                    },
                                    "background": {
                                        "type": "boolean",
                                        "description": "Run in the background; without stream, HTTP 202 with a response ID follows"
                                    },
                                    "store": {
                                        "type": "boolean",
                                        "description": "Keep the response and its events retrievable for 24 hours after completion; default true with background, otherwise false"
                                    },
                                    "webhook_endpoint_id": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Registered webhook target for a background job"
                                    },
                                    "max_output_tokens": {
                                        "type": "integer",
                                        "description": "Upper limit for the output, 1 to 128,000. Without a value the model's maximum applies; if none is stored for the model, 4,096 tokens apply. null counts as no value. OpenAI models accept at least 16 tokens; a smaller value is rejected with 400"
                                    },
                                    "context_compression": {
                                        "type": "boolean",
                                        "description": "Allows FlowModels to summarise an overly long history you sent yourself, server-side; default false. Without it, an overly long history is rejected with 400 context_length_exceeded rather than truncated. The summary is an additional paid model call and is reported in usage.flowai.compression"
                                    },
                                    "reasoning": {
                                        "type": "object",
                                        "properties": {
                                            "effort": {
                                                "type": "string",
                                                "description": "Reasoning depth of the model: none, minimal, low, medium, high, xhigh or max, on this endpoint inside the reasoning object instead of reasoning_effort. Which levels a model accepts is listed in capabilities.reasoning_levels from GET /models. Without a value the provider default applies; a level the model does not know is rejected with HTTP 400 and unsupported_for_model"
                                            }
                                        }
                                    },
                                    "web_search": {
                                        "type": "boolean",
                                        "description": "Turns on the provider's native web search. Off by default, because every search is billed additionally. Models without native search reject true; models with built-in search (Perplexity, Groq Compound) reject false, in both cases with HTTP 400 and unsupported_for_model. The web_search and web_search_forced fields in GET /models are authoritative"
                                    },
                                    "response_format": {
                                        "type": "object",
                                        "description": "Output shape as for Chat Completions: {\"type\":\"text\"}, {\"type\":\"json_object\"} or {\"type\":\"json_schema\",\"json_schema\":{\"name\":…,\"schema\":…,\"strict\":…}}. The response mirrors it back as text.format with the schema embedded flat; without a value the response has no text field"
                                    },
                                    "text": {
                                        "type": "object",
                                        "properties": {
                                            "format": {
                                                "type": "object",
                                                "description": "Alternative spelling of the OpenAI Responses API, as the official SDKs send it: {\"type\":\"json_object\"} or {\"type\":\"json_schema\",\"name\":…,\"schema\":…,\"strict\":…} with a flat schema. It works exactly like response_format. Sending both fields is rejected with HTTP 400, as are further keys in text such as verbosity"
                                            }
                                        }
                                    },
                                    "tools": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Your own functions, in the same spelling as for Chat Completions: [{\"type\":\"function\",\"function\":{\"name\":…,\"parameters\":<JSON Schema>}}]. The response mirrors them back in the Responses spelling with a flat name, but you always send the nested form. FlowModels does not execute the functions"
                                    },
                                    "tool_choice": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "object"
                                            }
                                        ],
                                        "description": "As for Chat Completions: \"auto\", \"none\", \"required\" or an object naming exactly one function. Both spellings are accepted, {\"type\":\"function\",\"name\":…} as well as {\"type\":\"function\",\"function\":{\"name\":…}}"
                                    },
                                    "parallel_tool_calls": {
                                        "type": "boolean",
                                        "description": "Allows or forbids several function calls in one response. Only allowed together with tools. Not every model has this switch; parallel_tool_calls in GET /models is authoritative, otherwise the API answers HTTP 400 and unsupported_for_model"
                                    },
                                    "stream_options": {
                                        "type": "object",
                                        "description": "Accepts include_usage only and requires stream: true. With include_usage: true a final chunk reports the usage of the streamed response"
                                    },
                                    "user": {
                                        "type": "string",
                                        "description": "Your own identifier of the calling end user for abuse tracing, up to 128 characters. It does not replace external_identifier and does not enable Brain context"
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "Up to 16 string pairs that are kept with the stored response and returned in it. On Chat Completions the field is rejected because nothing is stored there"
                                    },
                                    "search_domain_filter": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Restricts native web search to up to 20 domains, for example [\"company.de\"], or excludes them with a leading minus sign, for example [\"-reddit.com\"]. Either allowed domains only or exclusions only; domains without https:// and without a path, subdomains are included. The field turns on web search and is billed additionally. How many domains a model accepts is listed in GET /models under capabilities.web_search_domain_filter_max (xAI 5, otherwise 20); models without a domain filter such as Gemini reject the field with 400 unsupported_for_model"
                                    }
                                },
                                "required": [
                                    "model",
                                    "input"
                                ]
                            },
                            "example": {
                                "model": "groq/openai/gpt-oss-120b",
                                "external_identifier": "customer-42",
                                "input": "Summarize the benefits of clear project planning.",
                                "max_output_tokens": 512
                            }
                        }
                    }
                }
            }
        },
        "/responses/{response_uuid}": {
            "get": {
                "operationId": "responses-show",
                "summary": "Retrieve the response status",
                "description": "Returns a stored response of the same team within its retention period.",
                "tags": [
                    "responses"
                ],
                "parameters": [
                    {
                        "name": "response_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "resp_01HXYZ",
                                    "object": "response",
                                    "created_at": 1735000000,
                                    "status": "completed",
                                    "model": "groq/openai/gpt-oss-120b",
                                    "conversation": "018f1234-5678-7abc-9def-0123456789ab",
                                    "output": [
                                        {
                                            "type": "message",
                                            "role": "assistant",
                                            "content": [
                                                {
                                                    "type": "output_text",
                                                    "text": "Clear planning makes goals, tasks and deadlines easy to follow."
                                                }
                                            ]
                                        }
                                    ],
                                    "usage": {
                                        "input_tokens": 42,
                                        "output_tokens": 24,
                                        "total_tokens": 66,
                                        "cost": "0.000090",
                                        "currency": "EUR"
                                    },
                                    "flowai_request_id": "01HXYZ"
                                }
                            },
                            "text/event-stream": {
                                "schema": {
                                    "type": "string"
                                },
                                "example": "id: 5\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"sequence_number\":5,\"item_id\":\"msg_example\",\"output_index\":0,\"content_index\":0,\"delta\":\"Clear goals help.\"}\n\n"
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/responses/{response_uuid}/cancel": {
            "post": {
                "operationId": "responses-cancel",
                "summary": "Cancel a response",
                "description": "Idempotently requests cancellation of a background job and returns its current state.",
                "tags": [
                    "responses"
                ],
                "parameters": [
                    {
                        "name": "response_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "resp_018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "response",
                                    "created_at": 1735000000,
                                    "status": "cancelled",
                                    "error": null,
                                    "incomplete_details": null,
                                    "model": "groq/openai/gpt-oss-120b",
                                    "output": [],
                                    "output_text": "",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/end-users": {
            "get": {
                "operationId": "end-users-list",
                "summary": "List end users",
                "description": "Lists the end users of the authenticated workspace with a UUID cursor.",
                "tags": [
                    "end-users"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number of entries from 1 to 100, default 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID from last_id of the previous page",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "end_user",
                                            "external_identifier": "customer-42",
                                            "metadata": {
                                                "plan": "pro"
                                            }
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "end-users-create",
                "summary": "Create or resolve an end user",
                "description": "Creates an end user from your stable external identifier or returns the existing record.",
                "tags": [
                    "end-users"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user",
                                    "external_identifier": "customer-42",
                                    "metadata": {
                                        "plan": "pro"
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "external_identifier": {
                                        "type": "string",
                                        "description": "Your stable, non-sensitive identifier for this end user"
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "Optional metadata of your own"
                                    }
                                },
                                "required": [
                                    "external_identifier"
                                ]
                            },
                            "example": {
                                "external_identifier": "customer-42",
                                "metadata": {
                                    "plan": "pro"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/end-users/{end_user_uuid}": {
            "get": {
                "operationId": "end-users-show",
                "summary": "Retrieve an end user",
                "description": "Returns an end user by their UUID.",
                "tags": [
                    "end-users"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user",
                                    "external_identifier": "customer-42",
                                    "metadata": {
                                        "plan": "pro"
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "end-users-update",
                "summary": "Update an end user",
                "description": "Adds metadata or changes the automatic memory extraction of an end user.",
                "tags": [
                    "end-users"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user",
                                    "external_identifier": "customer-42",
                                    "metadata": {
                                        "plan": "enterprise"
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "metadata": {
                                        "type": "object",
                                        "description": "Metadata that is merged with the existing values"
                                    },
                                    "memory_extraction_enabled": {
                                        "type": "boolean",
                                        "description": "Enables or disables automatic memory extraction"
                                    }
                                }
                            },
                            "example": {
                                "memory_extraction_enabled": false
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "end-users-delete",
                "summary": "Delete an end user",
                "description": "Deletes the personal working data of an end user. Billing and usage rows are kept.",
                "tags": [
                    "end-users"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/end_users/{end_user_uuid}/erasures": {
            "get": {
                "operationId": "end-users-erasures-list",
                "summary": "List deletion runs",
                "description": "Lists the deletion receipts for an end-user identifier, also after deletion.",
                "tags": [
                    "end-users"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 100, default 20",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from last_id of the previous page",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "end_user.erasure",
                                            "status": "completed",
                                            "requested_at": "2026-09-11T08:15:00+00:00",
                                            "completed_at": "2026-09-11T08:15:04+00:00",
                                            "manifest_summary": {
                                                "resources": {
                                                    "memories": {
                                                        "before": 12,
                                                        "after": 0
                                                    },
                                                    "end_user_files": {
                                                        "before": 3,
                                                        "after": 0
                                                    }
                                                },
                                                "objects_remaining": 0
                                            }
                                        }
                                    ],
                                    "has_more": false,
                                    "last_id": "aWQ6MTIz",
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/end_users/{end_user_uuid}/erasures/{run_uuid}": {
            "get": {
                "operationId": "end-users-erasures-show",
                "summary": "Retrieve a deletion receipt",
                "description": "Returns a single deletion receipt with timestamps and counts per data type.",
                "tags": [
                    "end-users"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "run_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user.erasure",
                                    "status": "completed",
                                    "requested_at": "2026-09-11T08:15:00+00:00",
                                    "completed_at": "2026-09-11T08:15:04+00:00",
                                    "manifest_summary": {
                                        "resources": {
                                            "memories": {
                                                "before": 12,
                                                "after": 0
                                            },
                                            "end_user_files": {
                                                "before": 3,
                                                "after": 0
                                            }
                                        },
                                        "objects_remaining": 0
                                    },
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/end_users/{end_user_uuid}/files": {
            "post": {
                "operationId": "end-users-file-create",
                "summary": "Upload an end-user file",
                "description": "Stores a text file for the end user and starts its processing. Use multipart/form-data.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user.file",
                                    "filename": "profil.pdf",
                                    "bytes": 2048,
                                    "status": "pending",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Supported text or document file with a file name of up to 255 characters"
                                    },
                                    "purpose": {
                                        "type": "string",
                                        "description": "Required value user_data; other purposes are rejected"
                                    }
                                },
                                "required": [
                                    "file",
                                    "purpose"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "end-users-files-list",
                "summary": "List files",
                "description": "Lists the files of an end user, newest first.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 100, default 20",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from last_id of the previous page",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "end_user.file",
                                            "filename": "angebot.pdf",
                                            "bytes": 18432,
                                            "status": "completed",
                                            "created": 1735000000
                                        }
                                    ],
                                    "has_more": false,
                                    "last_id": "aWQ6MTIz",
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/end_users/{end_user_uuid}/files/{file_uuid}": {
            "get": {
                "operationId": "end-users-files-show",
                "summary": "Retrieve a file",
                "description": "Returns the details of a single file, without its content.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user.file",
                                    "filename": "angebot.pdf",
                                    "bytes": 18432,
                                    "status": "completed",
                                    "created": 1735000000,
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "end-users-files-delete",
                "summary": "Delete a file",
                "description": "Removes a single file including the text passages derived from it.",
                "tags": [
                    "files"
                ],
                "parameters": [
                    {
                        "name": "end_user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "end_user.file",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/files": {
            "post": {
                "operationId": "files-create",
                "summary": "Upload a file",
                "description": "Stores a file for later requests. Use multipart/form-data.",
                "tags": [
                    "workspace-files"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "file",
                                    "bytes": 2048,
                                    "created_at": 1735000000,
                                    "expires_at": null,
                                    "filename": "analyse.pdf",
                                    "purpose": "user_data",
                                    "status": "processed",
                                    "status_details": null,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "File to upload"
                                    },
                                    "purpose": {
                                        "type": "string",
                                        "description": "user_data or vision"
                                    }
                                },
                                "required": [
                                    "file",
                                    "purpose"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "files-list",
                "summary": "List files",
                "description": "Lists the files of the workspace with a stable cursor.",
                "tags": [
                    "workspace-files"
                ],
                "parameters": [
                    {
                        "name": "purpose",
                        "in": "query",
                        "required": false,
                        "description": "Filter: user_data or vision",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "Sort order: asc or desc",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number from 1 to 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Public file ID from last_id",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "file",
                                            "bytes": 2048,
                                            "filename": "analyse.pdf",
                                            "purpose": "user_data",
                                            "status": "processed"
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/files/{file_uuid}": {
            "get": {
                "operationId": "files-show",
                "summary": "Retrieve file metadata",
                "description": "Returns metadata, not the file content.",
                "tags": [
                    "workspace-files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "file",
                                    "bytes": 2048,
                                    "created_at": 1735000000,
                                    "expires_at": null,
                                    "filename": "analyse.pdf",
                                    "purpose": "user_data",
                                    "status": "processed",
                                    "status_details": null,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "files-delete",
                "summary": "Delete a file",
                "description": "Deletes the stored bytes and their metadata.",
                "tags": [
                    "workspace-files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "file-018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "file",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/files/{file_uuid}/content": {
            "get": {
                "operationId": "files-content",
                "summary": "Download file content",
                "description": "Returns the stored bytes as a download with the original media type.",
                "tags": [
                    "workspace-files"
                ],
                "parameters": [
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/memories": {
            "post": {
                "operationId": "memories-create",
                "summary": "Create a memory",
                "description": "Stores a personal memory for an end user.",
                "tags": [
                    "memories"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "memory",
                                    "created": 1735000000,
                                    "text": "Prefers short summaries.",
                                    "kind": "preference",
                                    "revision": 1,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "external_identifier": {
                                        "type": "string",
                                        "description": "Your stable external end-user identifier"
                                    },
                                    "text": {
                                        "type": "string",
                                        "description": "Non-empty text of at most 10,000 characters"
                                    },
                                    "kind": {
                                        "type": "string",
                                        "description": "Optional type of the memory"
                                    }
                                },
                                "required": [
                                    "external_identifier",
                                    "text"
                                ]
                            },
                            "example": {
                                "external_identifier": "customer-42",
                                "text": "Prefers short summaries.",
                                "kind": "preference"
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "memories-search",
                "summary": "Search memories",
                "description": "Searches the memories of an end user semantically.",
                "tags": [
                    "memories"
                ],
                "parameters": [
                    {
                        "name": "external_identifier",
                        "in": "query",
                        "required": true,
                        "description": "Your stable end-user identifier",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Search text; without a value the memories are listed chronologically",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 100, default 20",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from last_id of the previous page; only when listing",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "memory",
                                            "created": 1735000000,
                                            "text": "Prefers short summaries.",
                                            "kind": "preference",
                                            "revision": 1
                                        }
                                    ],
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/memories/{memory_uuid}": {
            "patch": {
                "operationId": "memories-update",
                "summary": "Update a memory",
                "description": "Changes a memory if the given revision is current.",
                "tags": [
                    "memories"
                ],
                "parameters": [
                    {
                        "name": "memory_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "memory",
                                    "created": 1735000000,
                                    "text": "Prefers very short summaries.",
                                    "kind": "preference",
                                    "revision": 2,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "external_identifier": {
                                        "type": "string",
                                        "description": "Your stable external end-user identifier"
                                    },
                                    "text": {
                                        "type": "string",
                                        "description": "New memory text"
                                    },
                                    "revision": {
                                        "type": "integer",
                                        "description": "Current revision, at least 1"
                                    }
                                },
                                "required": [
                                    "external_identifier",
                                    "text",
                                    "revision"
                                ]
                            },
                            "example": {
                                "external_identifier": "customer-42",
                                "text": "Prefers short summaries with three bullet points.",
                                "revision": 1
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "memories-delete",
                "summary": "Delete a memory",
                "description": "Deletes a memory of the specified end user.",
                "tags": [
                    "memories"
                ],
                "parameters": [
                    {
                        "name": "memory_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "memory",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "external_identifier": {
                                        "type": "string",
                                        "description": "Your stable external end-user identifier"
                                    }
                                },
                                "required": [
                                    "external_identifier"
                                ]
                            },
                            "example": {
                                "external_identifier": "customer-42"
                            }
                        }
                    }
                }
            }
        },
        "/webhook_endpoints": {
            "post": {
                "operationId": "webhooks-create",
                "summary": "Create a webhook",
                "description": "Registers an HTTPS target and returns the signing secret once.",
                "tags": [
                    "webhooks"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "url": "https://example.com/webhook",
                                    "events": [
                                        "response.completed"
                                    ],
                                    "description": "Production",
                                    "is_active": true,
                                    "deactivated_at": null,
                                    "deactivation_reason": null,
                                    "last_delivered_at": null,
                                    "created": 1735000000,
                                    "secret": "<random string, 48 characters>",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "Publicly reachable HTTPS address, at most 2,048 characters"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "At least one supported event type"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Optional description, at most 255 characters"
                                    }
                                },
                                "required": [
                                    "url",
                                    "events"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "webhooks-list",
                "summary": "List webhooks",
                "description": "Lists the webhook targets of the workspace without secrets.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number from 1 to 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID from last_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "webhook_endpoint",
                                            "url": "https://example.com/webhook",
                                            "events": [
                                                "response.completed"
                                            ],
                                            "is_active": true
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhook_endpoints/{webhook_uuid}": {
            "get": {
                "operationId": "webhooks-show",
                "summary": "Retrieve a webhook",
                "description": "Returns a webhook target without its signing secret.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "url": "https://example.com/webhook",
                                    "events": [
                                        "response.completed"
                                    ],
                                    "description": "Production",
                                    "is_active": true,
                                    "deactivated_at": null,
                                    "deactivation_reason": null,
                                    "last_delivered_at": null,
                                    "created": 1735000000,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "webhooks-update",
                "summary": "Update a webhook",
                "description": "Changes the target, events, description or activation status.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "url": "https://example.com/webhook",
                                    "events": [
                                        "response.completed"
                                    ],
                                    "description": "Updated",
                                    "is_active": true,
                                    "deactivated_at": null,
                                    "deactivation_reason": null,
                                    "last_delivered_at": null,
                                    "created": 1735000000,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "New publicly reachable HTTPS address"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": [],
                                        "description": "New list of supported event types"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "New description or null"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Deactivates or reactivates the target"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "webhooks-delete",
                "summary": "Delete a webhook",
                "description": "Deletes the target and its delivery history.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "object": "webhook_endpoint",
                                    "deleted": true,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhook_endpoints/{webhook_uuid}/deliveries": {
            "get": {
                "operationId": "webhook-deliveries-list",
                "summary": "List deliveries",
                "description": "Lists delivery attempts with status and error details.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, delivered, failed or exhausted",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number from 1 to 100",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "UUID from last_id",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "id": "018f1234-5678-7abc-9def-0123456789ab",
                                            "object": "webhook_delivery",
                                            "event_type": "response.completed",
                                            "status": "delivered",
                                            "attempts": 1,
                                            "http_status": 200,
                                            "failure_kind": null,
                                            "created": 1735000000,
                                            "delivered_at": 1735000001,
                                            "failed_at": null,
                                            "next_attempt_at": null,
                                            "response_id": "resp_01HXYZ…"
                                        }
                                    ],
                                    "has_more": false,
                                    "first_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "last_id": "018f1234-5678-7abc-9def-0123456789ab",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhook_endpoints/{webhook_uuid}/test": {
            "post": {
                "operationId": "webhooks-test",
                "summary": "Send a test delivery",
                "description": "Queues a synthetic delivery of type webhook.test. The result appears in the delivery history.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "webhook_delivery",
                                    "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                    "status": "pending",
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhook_endpoints/{webhook_uuid}/rotate_secret": {
            "post": {
                "operationId": "webhooks-rotate-secret",
                "summary": "Rotate the secret",
                "description": "Generates a new signing secret and returns it once. The previous secret stays valid until the stated time.",
                "tags": [
                    "webhooks"
                ],
                "parameters": [
                    {
                        "name": "webhook_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "webhook_endpoint",
                                    "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                    "secret": "<random string, 48 characters>",
                                    "secondary_secret_expires_at": 1735086400,
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/credits": {
            "get": {
                "operationId": "billing-credits",
                "summary": "Retrieve credit",
                "description": "Returns the independent EUR account of the authenticated team, without any payment or model call.",
                "tags": [
                    "billing"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "credit_balance",
                                    "currency": "EUR",
                                    "billing_mode": "prepaid",
                                    "balance_micro_eur": 20000000,
                                    "reserved_micro_eur": 1000000,
                                    "available_micro_eur": 19000000,
                                    "outstanding_micro_eur": 0,
                                    "postpaid_limit_micro_eur": 0,
                                    "spendable_micro_eur": 19000000,
                                    "reserved_oldest_at": "2026-09-11T08:15:00+00:00",
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/usage": {
            "get": {
                "operationId": "usage-summary",
                "summary": "Summarise usage",
                "description": "Summarises requests, tokens and costs for a period by day, model, key or end user.",
                "tags": [
                    "billing"
                ],
                "parameters": [
                    {
                        "name": "start",
                        "in": "query",
                        "required": false,
                        "description": "First day in the format YYYY-MM-DD, default 29 days before end",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end",
                        "in": "query",
                        "required": false,
                        "description": "Last day in the format YYYY-MM-DD, default today",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "required": false,
                        "description": "day, model, api_key or end_user; default day",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "bucket": "2026-09-10",
                                            "requests": 42,
                                            "prompt_tokens": 18450,
                                            "completion_tokens": 3120,
                                            "total_tokens": 21570,
                                            "cost_micro_eur": 1840000
                                        }
                                    ],
                                    "start": "2026-08-13",
                                    "end": "2026-09-11",
                                    "group_by": "day",
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/usage/requests": {
            "get": {
                "operationId": "usage-requests",
                "summary": "List individual requests",
                "description": "Lists individual requests with model, provider, status, runtime, token counts and cost, without request or response text.",
                "tags": [
                    "billing"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page, 1 to 100, default 20",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "required": false,
                        "description": "Cursor from last_id of the previous page",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Only requests with this status",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "query",
                        "required": false,
                        "description": "UUID of a key of the same workspace",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_user",
                        "in": "query",
                        "required": false,
                        "description": "External end-user identifier",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "model",
                        "in": "query",
                        "required": false,
                        "description": "Model identifier as sent in the request",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "list",
                                    "data": [
                                        {
                                            "request_id": "01HXYZ",
                                            "created_at": "2026-09-11T08:15:00+00:00",
                                            "api_key": "018f1234-5678-7abc-9def-0123456789ab",
                                            "end_user": "customer-42",
                                            "model": "groq/openai/gpt-oss-120b",
                                            "provider": "groq",
                                            "status": "success",
                                            "error_code": null,
                                            "latency_ms": 842,
                                            "prompt_tokens": 430,
                                            "completion_tokens": 112,
                                            "cost_micro_eur": 41000
                                        }
                                    ],
                                    "has_more": false,
                                    "last_id": "aWQ6MTIz",
                                    "flowai_request_id": "01HXYZ"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/key": {
            "get": {
                "operationId": "api-key-status",
                "summary": "Check the API key in use",
                "description": "Returns status, key type and applicable request limits for the authenticating API key.",
                "tags": [
                    "billing"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "object": "api_key",
                                    "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                    "name": "Production",
                                    "status": "active",
                                    "kind": "inference",
                                    "created_at": "2026-09-07T12:00:00+00:00",
                                    "last_used_at": "2026-09-07T12:10:00+00:00",
                                    "expires_at": null,
                                    "limits": {
                                        "requests": {
                                            "tier": 1,
                                            "per_minute": 60
                                        },
                                        "concurrency": {
                                            "max_concurrent_requests": 10
                                        },
                                        "payload": {
                                            "max_payload_bytes": 4194304,
                                            "max_messages_per_request": 1000,
                                            "max_chars_per_message": 1000000
                                        },
                                        "spending": {
                                            "currency": "EUR",
                                            "monthly_limit_micro_eur": 50000000
                                        }
                                    },
                                    "flowai_request_id": "01HXYZ…ULID"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/user/api-keys": {
            "servers": [
                {
                    "url": "https://creativeskyline.de"
                }
            ],
            "get": {
                "operationId": "api-keys-list",
                "summary": "List API keys",
                "description": "Lists the active keys of the authenticated user in the authenticated workspace. Secret token values are never returned.",
                "tags": [
                    "billing"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                            "name": "Production",
                                            "is_personal": false,
                                            "kind": "inference",
                                            "created_at": "2026-09-07T12:00:00+00:00",
                                            "last_used_at": null,
                                            "expires_at": null
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "api-keys-create",
                "summary": "Create an API key",
                "description": "Creates a key in the authenticated workspace and returns the new token value in this response.",
                "tags": [
                    "billing"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "API key created.",
                                    "data": {
                                        "token": "at_…",
                                        "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                        "name": "Production",
                                        "kind": "inference",
                                        "created_at": "2026-09-07T12:00:00+00:00",
                                        "expires_at": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name, at most 255 characters"
                                    },
                                    "kind": {
                                        "type": "string",
                                        "description": "inference or management; default management. Explicitly use inference for model requests"
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "format": "date-time",
                                        "description": "Optional expiry time in the future"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            },
                            "example": {
                                "name": "FlowModels production",
                                "kind": "inference"
                            }
                        }
                    }
                }
            }
        },
        "/api/user/api-keys/{key_uuid}": {
            "servers": [
                {
                    "url": "https://creativeskyline.de"
                }
            ],
            "delete": {
                "operationId": "api-keys-delete",
                "summary": "Revoke an API key",
                "description": "Immediately revokes an additional key of the authenticated workspace. Personal keys can only be renewed.",
                "tags": [
                    "billing"
                ],
                "parameters": [
                    {
                        "name": "key_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "API key deleted."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/user/api-keys/{key_uuid}/regenerate": {
            "servers": [
                {
                    "url": "https://creativeskyline.de"
                }
            ],
            "put": {
                "operationId": "api-keys-regenerate",
                "summary": "Renew an API key",
                "description": "Replaces the token value of a key in the authenticated workspace. The configured grace period determines how long the previous value remains valid.",
                "tags": [
                    "billing"
                ],
                "parameters": [
                    {
                        "name": "key_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "API key regenerated.",
                                    "data": {
                                        "token": "at_…",
                                        "uuid": "018f1234-5678-7abc-9def-0123456789ab",
                                        "name": "Production"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error in the common error format",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API key as Authorization: Bearer <token>. Any other way of sending it is rejected with 401 invalid_token_source."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "message",
                            "type",
                            "code"
                        ],
                        "properties": {
                            "message": {
                                "type": "string"
                            },
                            "type": {
                                "type": "string"
                            },
                            "code": {
                                "type": "string"
                            },
                            "param": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "flowai_request_id": {
                        "type": "string"
                    }
                }
            },
            "Usage": {
                "type": "object",
                "properties": {
                    "prompt_tokens": {
                        "type": "integer"
                    },
                    "completion_tokens": {
                        "type": "integer"
                    },
                    "total_tokens": {
                        "type": "integer"
                    },
                    "cost": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    }
                }
            },
            "ChatCompletion": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "chat.completion"
                    },
                    "created": {
                        "type": "integer"
                    },
                    "model": {
                        "type": "string"
                    },
                    "choices": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "usage": {
                        "$ref": "#/components/schemas/Usage"
                    },
                    "flowai_request_id": {
                        "type": "string"
                    }
                }
            },
            "Response": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "response"
                    },
                    "status": {
                        "type": "string"
                    },
                    "model": {
                        "type": "string"
                    },
                    "output": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "output_text": {
                        "type": "string"
                    },
                    "usage": {
                        "$ref": "#/components/schemas/Usage"
                    },
                    "flowai_request_id": {
                        "type": "string"
                    }
                }
            },
            "Model": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "model"
                    },
                    "created": {
                        "type": "integer"
                    },
                    "owned_by": {
                        "type": "string"
                    },
                    "pricing": {
                        "type": "object"
                    },
                    "context_length": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "capabilities": {
                        "type": "object"
                    },
                    "flowai_limits": {
                        "type": "object"
                    },
                    "deprecated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            }
        }
    }
}