-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
1899 lines (1793 loc) · 57 KB
/
Copy pathopenapi.yml
File metadata and controls
1899 lines (1793 loc) · 57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.2.0
info:
title: Lemonade Server API
description: |
Lemonade Server is a standards-compliant HTTP API server for local LLM inference.
It supports OpenAI-compatible, Ollama-compatible, and Anthropic-compatible endpoints,
as well as Lemonade-specific management endpoints.
**Note:** This server is intended for use on local systems only.
Do not expose the server port to the open internet.
Default base URL: `http://localhost:8000`
version: 10.0.0
contact:
url: https://lemonade-server.ai/docs/server/server_spec/
servers:
- url: http://localhost:8000
description: Default local server
tags:
- name: OpenAI-Compatible
description: OpenAI-compatible chat, completion, embedding, and media endpoints
- name: llama.cpp
description: llama.cpp-specific endpoints (reranking)
- name: Lemonade-Specific
description: Lemonade-specific model management and system endpoints
- name: Ollama-Compatible
description: Ollama-compatible API endpoints
- name: Anthropic-Compatible
description: Anthropic-compatible Messages API endpoint
paths:
# ─────────────────────────────────────────────
# OpenAI-Compatible Endpoints
# ─────────────────────────────────────────────
/api/v1/chat/completions:
post:
tags: [OpenAI-Compatible]
summary: Chat Completions
description: |
Chat Completions API. You provide a list of messages and receive a completion.
This API will also load the model if it is not already loaded.
operationId: createChatCompletion
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionRequest'
example:
model: Qwen3-0.6B-GGUF
messages:
- role: user
content: What is the population of Paris?
stream: false
responses:
'200':
description: Successful completion
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionResponse'
text/event-stream:
schema:
$ref: '#/components/schemas/ChatCompletionStreamResponse'
/api/v1/completions:
post:
tags: [OpenAI-Compatible]
summary: Text Completions
description: |
Text Completions API. You provide a prompt and receive a completion.
This API will also load the model if it is not already loaded.
operationId: createCompletion
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CompletionRequest'
example:
model: Qwen3-0.6B-GGUF
prompt: What is the population of Paris?
stream: false
responses:
'200':
description: Successful completion
content:
application/json:
schema:
$ref: '#/components/schemas/CompletionResponse'
/api/v1/embeddings:
post:
tags: [OpenAI-Compatible]
summary: Embeddings
description: |
Embeddings API. You provide input text and receive vector representations
(embeddings) that can be used for semantic search, clustering, and similarity comparisons.
This API will also load the model if it is not already loaded.
Note: Only available for models using the `llamacpp` or `flm` recipes.
ONNX models (OGA recipes) do not support embeddings.
operationId: createEmbedding
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingRequest'
example:
model: nomic-embed-text-v1-GGUF
input: ["Hello, world!", "How are you?"]
encoding_format: float
responses:
'200':
description: Successful embedding
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingResponse'
/api/v1/reranking:
post:
tags: [llama.cpp]
summary: Reranking
description: |
Reranking API. You provide a query and a list of documents, and receive the documents
reordered by their relevance to the query with relevance scores.
This API will also load the model if it is not already loaded.
Note: This endpoint follows API conventions similar to OpenAI's format but is not
part of the official OpenAI API. It is only available for models using the `llamacpp` recipe.
operationId: createReranking
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RerankingRequest'
example:
model: bge-reranker-v2-m3-GGUF
query: What is the capital of France?
documents:
- Paris is the capital of France.
- Berlin is the capital of Germany.
- Madrid is the capital of Spain.
responses:
'200':
description: Successful reranking
content:
application/json:
schema:
$ref: '#/components/schemas/RerankingResponse'
/api/v1/responses:
post:
tags: [OpenAI-Compatible]
summary: Responses (OpenAI Responses API)
description: |
Responses API. You provide an input and receive a response.
This API will also load the model if it is not already loaded.
Supported streaming events: `response.created`, `response.output_text.delta`, `response.completed`.
operationId: createResponse
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseRequest'
example:
model: Llama-3.2-1B-Instruct-Hybrid
input: What is the population of Paris?
stream: false
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseObject'
text/event-stream:
schema:
type: string
description: Server-Sent Events stream
/api/v1/audio/transcriptions:
post:
tags: [OpenAI-Compatible]
summary: Audio Transcription
description: |
Audio Transcription API. You provide an audio file and receive a text transcription.
This API will also load the model if it is not already loaded.
Limitations: Only `wav` audio format and `json` response format are currently supported.
operationId: createTranscription
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file, model]
properties:
file:
type: string
format: binary
description: "The audio file to transcribe. Supported formats: wav."
model:
type: string
description: The Whisper model to use (e.g., Whisper-Tiny, Whisper-Base, Whisper-Small).
example: Whisper-Tiny
language:
type: string
description: The language of the audio (ISO 639-1 code). If not specified, Whisper will auto-detect.
example: en
response_format:
type: string
description: The format of the response. Currently only `json` is supported.
enum: [json]
default: json
responses:
'200':
description: Successful transcription
content:
application/json:
schema:
type: object
properties:
text:
type: string
description: The transcribed text from the audio file.
example:
text: Hello, this is a sample transcription of the audio file.
/api/v1/audio/speech:
post:
tags: [OpenAI-Compatible]
summary: Text to Speech
description: |
Speech Generation API. You provide a text input and receive an audio file.
Uses Kokoros as the backend.
Note: The only currently supported model is `kokoro-v1`.
Supported output formats: `mp3`, `wav`, `opus`, `pcm`.
Streaming is supported in `audio` (`pcm`) mode via `stream_format`.
operationId: createSpeech
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SpeechRequest'
example:
model: kokoro-v1
input: Lemonade can speak!
speed: 1.0
response_format: mp3
responses:
'200':
description: Audio file
content:
audio/mpeg:
schema:
type: string
format: binary
audio/wav:
schema:
type: string
format: binary
audio/ogg:
schema:
type: string
format: binary
audio/pcm:
schema:
type: string
format: binary
/api/v1/images/generations:
post:
tags: [OpenAI-Compatible]
summary: Image Generation
description: |
Image Generation API. You provide a text prompt and receive a generated image.
Uses stable-diffusion.cpp as the backend.
Available models: `SD-Turbo` (fast, ~4 steps), `SDXL-Turbo`, `SD-1.5`, `SDXL-Base-1.0`.
operationId: createImageGeneration
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImageGenerationRequest'
example:
model: SD-Turbo
prompt: A serene mountain landscape at sunset
size: 512x512
steps: 4
response_format: b64_json
responses:
'200':
description: Generated image
content:
application/json:
schema:
$ref: '#/components/schemas/ImageResponse'
/api/v1/images/edits:
post:
tags: [OpenAI-Compatible]
summary: Image Editing
description: |
Image Editing API. You provide a source image and a text prompt describing the desired
change, and receive an edited image.
Uses stable-diffusion.cpp as the backend.
Note: This endpoint accepts `multipart/form-data` requests (not JSON).
Use editing-capable models such as `Flux-2-Klein-4B` or `SD-Turbo`.
operationId: createImageEdit
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/ImageEditRequest'
responses:
'200':
description: Edited image
content:
application/json:
schema:
$ref: '#/components/schemas/ImageResponse'
/api/v1/images/variations:
post:
tags: [OpenAI-Compatible]
summary: Image Variations
description: |
Image Variations API. You provide a source image and receive a variation of it.
Uses stable-diffusion.cpp as the backend.
Note: This endpoint accepts `multipart/form-data` requests (not JSON).
A `prompt` parameter is not supported — the model generates a variation based solely
on the input image.
operationId: createImageVariation
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/ImageVariationRequest'
responses:
'200':
description: Image variation
content:
application/json:
schema:
$ref: '#/components/schemas/ImageResponse'
/api/v1/models:
get:
tags: [OpenAI-Compatible]
summary: List Models
description: |
Returns a list of models available on the server in an OpenAI-compatible format.
Each model object includes extended fields like `checkpoint`, `recipe`, `size`,
`downloaded`, and `labels`.
By default, only locally downloaded models are shown.
Use `show_all=true` to include models not yet downloaded.
operationId: listModels
parameters:
- name: show_all
in: query
required: false
schema:
type: boolean
default: false
description: If true, returns all models from the catalog including those not yet downloaded.
responses:
'200':
description: List of models
content:
application/json:
schema:
$ref: '#/components/schemas/ModelList'
/api/v1/models/{model_id}:
get:
tags: [OpenAI-Compatible]
summary: Retrieve a Model
description: Retrieve a specific model by its ID. Returns the same model object format as the list endpoint.
operationId: retrieveModel
parameters:
- name: model_id
in: path
required: true
schema:
type: string
description: The ID of the model to retrieve.
example: Qwen3-0.6B-GGUF
responses:
'200':
description: Model object
content:
application/json:
schema:
$ref: '#/components/schemas/Model'
'404':
description: Model not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
message: Model Qwen3-0.6B-GGUF has not been found
type: not_found
# ─────────────────────────────────────────────
# Lemonade-Specific Endpoints
# ─────────────────────────────────────────────
/api/v1/pull:
post:
tags: [Lemonade-Specific]
summary: Install/Register a Model
description: |
Register and install models for use with Lemonade Server.
**Install a registered model** by providing `model_name` only.
**Register and install a new model** from Hugging Face by also providing
`checkpoint` and `recipe`. The `model_name` must use the `user` namespace
(e.g., `user.My-Model`) to avoid collisions with built-in models.
When `stream=true`, Server-Sent Events with download progress are returned.
operationId: pullModel
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PullRequest'
examples:
registered:
summary: Install a registered model
value:
model_name: Qwen2.5-0.5B-Instruct-CPU
custom:
summary: Register and install a new model from HuggingFace
value:
model_name: user.Phi-4-Mini-GGUF
checkpoint: unsloth/Phi-4-mini-instruct-GGUF:Q4_K_M
recipe: llamacpp
responses:
'200':
description: Installation result or SSE stream
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
text/event-stream:
schema:
type: string
description: |
Server-Sent Events with download progress.
Event types:
- `progress`: `{"file","file_index","total_files","bytes_downloaded","bytes_total","percent"}`
- `complete`: `{"file_index","total_files","percent"}`
- `error`: `{"error"}`
/api/v1/delete:
post:
tags: [Lemonade-Specific]
summary: Delete a Model
description: |
Delete a model by removing it from local storage.
If the model is currently loaded, it will be unloaded first.
operationId: deleteModel
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model_name]
properties:
model_name:
type: string
description: Lemonade Server model name to delete.
example: Qwen2.5-0.5B-Instruct-CPU
responses:
'200':
description: Deletion result
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
/api/v1/load:
post:
tags: [Lemonade-Specific]
summary: Load a Model
description: |
Explicitly load a registered model into memory. Installs the model if necessary.
Setting priority (highest to lowest):
1. Values passed explicitly in the request
2. Per-model values from `recipe_options.json`
3. `lemonade-server` CLI arguments or environment variables
4. Hardcoded defaults in `lemonade-router`
operationId: loadModel
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoadRequest'
example:
model_name: Qwen3-0.6B-GGUF
ctx_size: 8192
llamacpp_backend: rocm
responses:
'200':
description: Load result
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
/api/v1/unload:
post:
tags: [Lemonade-Specific]
summary: Unload a Model
description: |
Explicitly unload a model from memory to free resources while keeping the server running.
If `model_name` is omitted, all loaded models are unloaded.
operationId: unloadModel
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
model_name:
type: string
description: Name of the model to unload. Omit to unload all models.
example: Qwen3-0.6B-GGUF
responses:
'200':
description: Unload result
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
/api/v1/health:
get:
tags: [Lemonade-Specific]
summary: Health Check
description: |
Check the health of the server. Returns information about loaded models,
server version, and resource limits.
operationId: getHealth
responses:
'200':
description: Server health information
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponse'
/api/v1/stats:
get:
tags: [Lemonade-Specific]
summary: Performance Statistics
description: Performance statistics from the last inference request.
operationId: getStats
responses:
'200':
description: Performance statistics
content:
application/json:
schema:
$ref: '#/components/schemas/StatsResponse'
/api/v1/system-info:
get:
tags: [Lemonade-Specific]
summary: System Information
description: |
System information endpoint that provides complete hardware details,
device enumeration, and recipe/backend support status.
operationId: getSystemInfo
responses:
'200':
description: System information
content:
application/json:
schema:
$ref: '#/components/schemas/SystemInfoResponse'
/api/v1/install:
post:
tags: [Lemonade-Specific]
summary: Install a Backend
description: |
Install or update a backend for a specific recipe/backend pair.
If the backend is already installed but outdated, this endpoint updates it.
When `stream=true`, Server-Sent Events with progress are returned.
operationId: installBackend
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BackendRequest'
example:
recipe: llamacpp
backend: vulkan
stream: false
responses:
'200':
description: Installation result
content:
application/json:
schema:
$ref: '#/components/schemas/BackendResponse'
text/event-stream:
schema:
type: string
/api/v1/uninstall:
post:
tags: [Lemonade-Specific]
summary: Uninstall a Backend
description: |
Uninstall a backend for a specific recipe/backend pair.
If loaded models are using that backend, they are unloaded first.
operationId: uninstallBackend
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BackendRequest'
example:
recipe: llamacpp
backend: vulkan
responses:
'200':
description: Uninstallation result
content:
application/json:
schema:
$ref: '#/components/schemas/BackendResponse'
/live:
get:
tags: [Lemonade-Specific]
summary: Liveness Check
description: Simple liveness probe for load balancers and orchestrators.
operationId: getLiveness
responses:
'200':
description: Server is live
# ─────────────────────────────────────────────
# Ollama-Compatible Endpoints
# ─────────────────────────────────────────────
/api/chat:
post:
tags: [Ollama-Compatible]
summary: Ollama Chat
description: Ollama-compatible chat endpoint. Supports streaming and non-streaming.
operationId: ollamaChat
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model, messages]
properties:
model:
type: string
messages:
type: array
items:
$ref: '#/components/schemas/Message'
stream:
type: boolean
default: true
responses:
'200':
description: Chat response
/api/generate:
post:
tags: [Ollama-Compatible]
summary: Ollama Generate
description: Text completion and image generation. Ollama-compatible.
operationId: ollamaGenerate
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model, prompt]
properties:
model:
type: string
prompt:
type: string
stream:
type: boolean
default: true
responses:
'200':
description: Generation response
/api/tags:
get:
tags: [Ollama-Compatible]
summary: Ollama List Models
description: Lists downloaded models. Ollama-compatible.
operationId: ollamaListModels
responses:
'200':
description: List of models
/api/show:
post:
tags: [Ollama-Compatible]
summary: Ollama Show Model Details
description: Returns model details. Ollama-compatible.
operationId: ollamaShowModel
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model]
properties:
model:
type: string
responses:
'200':
description: Model details
/api/delete:
delete:
tags: [Ollama-Compatible]
summary: Ollama Delete Model
description: Deletes a model. Ollama-compatible.
operationId: ollamaDeleteModel
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model]
properties:
model:
type: string
responses:
'200':
description: Deletion result
/api/pull:
post:
tags: [Ollama-Compatible]
summary: Ollama Pull Model
description: Download a model with progress. Ollama-compatible.
operationId: ollamaPullModel
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model]
properties:
model:
type: string
stream:
type: boolean
default: true
responses:
'200':
description: Pull result
/api/embed:
post:
tags: [Ollama-Compatible]
summary: Ollama Embeddings (new format)
description: Generate embeddings. New Ollama format.
operationId: ollamaEmbed
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model, input]
properties:
model:
type: string
input:
oneOf:
- type: string
- type: array
items:
type: string
responses:
'200':
description: Embedding result
/api/embeddings:
post:
tags: [Ollama-Compatible]
summary: Ollama Embeddings (legacy format)
description: Generate embeddings. Legacy Ollama format.
operationId: ollamaEmbeddings
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model, prompt]
properties:
model:
type: string
prompt:
type: string
responses:
'200':
description: Embedding result
/api/ps:
get:
tags: [Ollama-Compatible]
summary: Ollama Running Models
description: Returns currently running models. Ollama-compatible.
operationId: ollamaListRunning
responses:
'200':
description: Running models
/api/version:
get:
tags: [Ollama-Compatible]
summary: Ollama Version
description: Returns the server version. Ollama-compatible.
operationId: ollamaVersion
responses:
'200':
description: Version information
# ─────────────────────────────────────────────
# Anthropic-Compatible Endpoints
# ─────────────────────────────────────────────
/v1/messages:
post:
tags: [Anthropic-Compatible]
summary: Anthropic Messages
description: |
Anthropic-compatible Messages API. Supports both streaming and non-streaming.
Query params such as `?beta=true` are accepted.
Supported fields: `model`, `messages`, `system`, `max_tokens`, `temperature`,
`stream`, and basic `tools`. Unsupported or unimplemented Anthropic-specific fields
are ignored and surfaced via warning logs/headers.
operationId: createAnthropicMessage
parameters:
- name: beta
in: query
required: false
schema:
type: boolean
description: Enable beta features (accepted but may not change behavior).
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model, messages, max_tokens]
properties:
model:
type: string
description: The model to use.
messages:
type: array
items:
$ref: '#/components/schemas/Message'
system:
type: string
description: Optional system prompt.
max_tokens:
type: integer
description: Maximum number of tokens to generate.
temperature:
type: number
format: float
description: Sampling temperature.
stream:
type: boolean
default: false
tools:
type: array
description: Basic tool definitions.
items:
type: object
responses:
'200':
description: Message response
# ─────────────────────────────────────────────
# Components
# ─────────────────────────────────────────────
components:
schemas:
# ── Shared ──────────────────────────────────
Message:
type: object
required: [role, content]
properties:
role:
type: string
enum: [system, user, assistant]
description: The role of the message author.
content:
description: |
The message content. Can be a plain string, or an array of content parts
for multimodal input (text + image_url).
oneOf:
- type: string
- type: array
items:
oneOf:
- type: object
required: [type, text]
properties:
type:
type: string
enum: [text]
text:
type: string
- type: object
required: [type, image_url]
properties:
type:
type: string
enum: [image_url]
image_url:
type: object
required: [url]
properties:
url:
type: string
description: URL or base64 data URL of the image.
UsageInfo:
type: object
properties:
prompt_tokens:
type: integer
total_tokens:
type: integer
StatusResponse:
type: object
properties:
status:
type: string
enum: [success, error]
message:
type: string
ErrorResponse:
type: object
properties: