diff options
| author | tv <tv@krebsco.de> | 2026-02-21 14:18:13 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-02-21 22:22:17 +0100 |
| commit | 55d42f1dd83b428aa0f1352bc0ea1402b9c2b811 (patch) | |
| tree | 81d5e80b385de42a0d1b48d3edd0d2b66d858b2d /openapi.yaml | |
generate initial commit
Generate haskell-http-client from running g4f v-7.1.4.
Server started like this:
python -m g4f --port 8080 --debug
Code generated like this:
openapi-generator-cli generate \
-i http://localhost:8080/openapi.json \
-g haskell-http-client \
--skip-validate-spec \
-o g4f-client \
--additional-properties=cabalPackage=g4f-client,cabalVersion=7.1.4,baseModule=G4fApi
Diffstat (limited to 'openapi.yaml')
| -rw-r--r-- | openapi.yaml | 2002 |
1 files changed, 2002 insertions, 0 deletions
diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000..06bf769 --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,2002 @@ +openapi: 3.1.0 +info: + title: FastAPI + version: 0.1.0 +servers: +- url: / +paths: + /v1: + get: + operationId: read_root_v1_v1_get + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + summary: Read Root V1 + /v1/models: + get: + operationId: models_v1_models_get + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/ModelResponseModel" + type: array + description: Successful Response + summary: Models + /api/{provider}/models: + get: + operationId: models_api__provider__models_get + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/ModelResponseModel" + type: array + description: Successful Response + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Models + /api/{provider}/quota: + get: + operationId: provider_quota_api__provider__quota_get + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + description: Successful Response + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Provider Quota + /v1/models/{model_name}: + get: + operationId: model_info_v1_models__model_name__get + parameters: + - explode: false + in: path + name: model_name + required: true + schema: + title: Model Name + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ModelResponseModel" + description: Successful Response + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Model Info + post: + operationId: model_info_v1_models__model_name__post + parameters: + - explode: false + in: path + name: model_name + required: true + schema: + title: Model Name + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ModelResponseModel" + description: Successful Response + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Model Info + /api/{provider}/{conversation_id}/chat/completions: + post: + operationId: chat_completions_api__provider___conversation_id__chat_completions_post + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + - explode: false + in: path + name: conversation_id + required: true + schema: + title: Conversation Id + type: string + style: simple + - explode: false + in: header + name: x-user + required: false + schema: + nullable: true + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatCompletionsConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ChatCompletion" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unprocessable Content + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + security: + - HTTPBearer: [] + summary: Chat Completions + /api/{provider}/chat/completions: + post: + operationId: chat_completions_api__provider__chat_completions_post + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + - explode: true + in: query + name: conversation_id + required: false + schema: + title: Conversation Id + type: string + style: form + - explode: false + in: header + name: x-user + required: false + schema: + nullable: true + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatCompletionsConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ChatCompletion" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unprocessable Content + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + security: + - HTTPBearer: [] + summary: Chat Completions + /v1/chat/completions: + post: + operationId: chat_completions_v1_chat_completions_post + parameters: + - explode: true + in: query + name: provider + required: false + schema: + title: Provider + type: string + style: form + - explode: true + in: query + name: conversation_id + required: false + schema: + title: Conversation Id + type: string + style: form + - explode: false + in: header + name: x-user + required: false + schema: + nullable: true + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatCompletionsConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ChatCompletion" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unprocessable Content + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + security: + - HTTPBearer: [] + summary: Chat Completions + /api/{provider}/images/generations: + post: + operationId: generate_image_api__provider__images_generations_post + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageGenerationConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImagesResponse" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Generate Image + /v1/images/generations: + post: + operationId: generate_image_v1_images_generations_post + parameters: + - explode: true + in: query + name: provider + required: false + schema: + title: Provider + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageGenerationConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImagesResponse" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Generate Image + /v1/images/generate: + post: + operationId: generate_image_v1_images_generate_post + parameters: + - explode: true + in: query + name: provider + required: false + schema: + title: Provider + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageGenerationConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImagesResponse" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Generate Image + /v1/media/generate: + post: + operationId: generate_image_v1_media_generate_post + parameters: + - explode: true + in: query + name: provider + required: false + schema: + title: Provider + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageGenerationConfig" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImagesResponse" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Generate Image + /v1/providers: + get: + operationId: providers_v1_providers_get + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/ProviderResponseModel" + type: array + description: Successful Response + summary: Providers + /v1/providers/{provider}: + get: + operationId: providers_info_v1_providers__provider__get + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ProviderResponseDetailModel" + description: Successful Response + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Providers Info + /api/markitdown: + post: + operationId: convert_api_markitdown_post + parameters: + - explode: true + in: query + name: path_provider + required: false + schema: + title: Path Provider + type: string + style: form + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/Body_convert_api_markitdown_post" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TranscriptionResponseModel" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Convert + /api/{path_provider}/audio/transcriptions: + post: + operationId: convert_api__path_provider__audio_transcriptions_post + parameters: + - explode: false + in: path + name: path_provider + required: true + schema: + title: Path Provider + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/Body_convert_api__path_provider__audio_transcriptions_post" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TranscriptionResponseModel" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Convert + /v1/audio/transcriptions: + post: + operationId: convert_v1_audio_transcriptions_post + parameters: + - explode: true + in: query + name: path_provider + required: false + schema: + title: Path Provider + type: string + style: form + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/Body_convert_v1_audio_transcriptions_post" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TranscriptionResponseModel" + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Convert + /api/{provider}/audio/speech: + post: + operationId: generate_speech_api__provider__audio_speech_post + parameters: + - explode: false + in: path + name: provider + required: true + schema: + title: Provider + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AudioSpeechConfig" + required: true + responses: + "200": + content: + application/json: + schema: {} + audio/*: {} + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Generate Speech + /v1/audio/speech: + post: + operationId: generate_speech_v1_audio_speech_post + parameters: + - explode: true + in: query + name: provider + required: false + schema: + title: Provider + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AudioSpeechConfig" + required: true + responses: + "200": + content: + application/json: + schema: {} + audio/*: {} + description: Successful Response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseModel" + description: Internal Server Error + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Generate Speech + /v1/upload_cookies: + post: + operationId: upload_cookies_v1_upload_cookies_post + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/Body_upload_cookies_v1_upload_cookies_post" + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FileResponseModel" + type: array + description: Successful Response + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + security: + - HTTPBearer: [] + summary: Upload Cookies + /media/{filename}: + get: + operationId: get_media_media__filename__get + parameters: + - explode: false + in: path + name: filename + required: true + schema: + title: Filename + style: simple + - explode: true + in: query + name: thumbnail + required: false + schema: + default: false + title: Thumbnail + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: {} + image/*: {} + audio/*: {} + description: Successful Response + "404": + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Get Media + /images/{filename}: + get: + operationId: get_media_images__filename__get + parameters: + - explode: false + in: path + name: filename + required: true + schema: + title: Filename + style: simple + - explode: true + in: query + name: thumbnail + required: false + schema: + default: false + title: Thumbnail + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: {} + image/*: {} + description: Successful Response + "404": + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Get Media + /thumbnail/{filename}: + get: + operationId: get_media_thumbnail_thumbnail__filename__get + parameters: + - explode: false + in: path + name: filename + required: true + schema: + title: Filename + type: string + style: simple + responses: + "200": + content: + application/json: + schema: {} + image/*: {} + audio/*: {} + description: Successful Response + "404": + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/HTTPValidationError" + description: Validation Error + summary: Get Media Thumbnail +components: + schemas: + AudioResponseModel: + example: + transcript: transcript + data: data + properties: + data: + title: Data + type: string + transcript: + nullable: true + type: string + required: + - data + title: AudioResponseModel + AudioSpeechConfig: + example: + voice: voice + input: input + response_format: response_format + provider: provider + model: model + instrcutions: Speech this text in a natural way. + language: language + download_media: true + properties: + input: + title: Input + type: string + model: + nullable: true + type: string + provider: + nullable: true + type: string + voice: + nullable: true + type: string + instrcutions: + default: Speech this text in a natural way. + title: Instrcutions + type: string + response_format: + nullable: true + type: string + language: + nullable: true + type: string + download_media: + default: true + title: Download Media + type: boolean + required: + - input + title: AudioSpeechConfig + Body_convert_api__path_provider__audio_transcriptions_post: + properties: + file: + format: binary + title: File + type: string + model: + nullable: true + type: string + provider: + nullable: true + type: string + prompt: + nullable: true + type: string + required: + - file + title: Body_convert_api__path_provider__audio_transcriptions_post + Body_convert_api_markitdown_post: + properties: + file: + format: binary + title: File + type: string + model: + nullable: true + type: string + provider: + nullable: true + type: string + prompt: + nullable: true + type: string + required: + - file + title: Body_convert_api_markitdown_post + Body_convert_v1_audio_transcriptions_post: + properties: + file: + format: binary + title: File + type: string + model: + nullable: true + type: string + provider: + nullable: true + type: string + prompt: + nullable: true + type: string + required: + - file + title: Body_convert_v1_audio_transcriptions_post + Body_upload_cookies_v1_upload_cookies_post: + properties: + files: + items: + format: binary + type: string + type: array + required: + - files + title: Body_upload_cookies_v1_upload_cookies_post + ChatCompletion: + example: + provider: provider + created: 0 + usage: + completion_tokens: 5 + cache: cache + prompt_tokens: 1 + completion_tokens_details: + audio_tokens: 2 + reasoning_tokens: 9 + image_tokens: 3 + prompt_tokens_details: + audio_tokens: 7 + cached_tokens: 2 + total_tokens: 5 + model: model + id: id + choices: + - finish_reason: finish_reason + index: 6 + message: + role: role + reasoning: reasoning + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + audio: + transcript: transcript + data: data + content: content + - finish_reason: finish_reason + index: 6 + message: + role: role + reasoning: reasoning + tool_calls: + - function: + name: name + arguments: arguments + id: id + type: type + - function: + name: name + arguments: arguments + id: id + type: type + audio: + transcript: transcript + data: data + content: content + conversation: + key: "" + object: object + properties: + id: + title: Id + type: string + object: |
