first commit
This commit is contained in:
176
docs/openapi/paths/integrations/genai/files.yaml
Normal file
176
docs/openapi/paths/integrations/genai/files.yaml
Normal file
@@ -0,0 +1,176 @@
|
||||
# Google GenAI (Gemini) - Files Endpoints
|
||||
|
||||
files-upload:
|
||||
post:
|
||||
operationId: geminiUploadFile
|
||||
summary: Upload file (Gemini format)
|
||||
description: |
|
||||
Uploads a file using Google Gemini API format.
|
||||
|
||||
This is a multipart upload with two parts:
|
||||
- "metadata": JSON object containing file metadata
|
||||
- "file": Binary file content
|
||||
|
||||
Note: Direct file content download is not supported by Gemini Files API.
|
||||
Use the file.uri field from the response to access uploaded files.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileUploadRequest'
|
||||
encoding:
|
||||
metadata:
|
||||
contentType: application/json
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileUploadResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
files:
|
||||
get:
|
||||
operationId: geminiListFiles
|
||||
summary: List files (Gemini format)
|
||||
description: |
|
||||
Lists uploaded files in Google Gemini API format.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: pageSize
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
description: Maximum number of files to return
|
||||
- name: pageToken
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Page token for pagination
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileListResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
files-by-id:
|
||||
get:
|
||||
operationId: geminiRetrieveFile
|
||||
summary: Retrieve file (Gemini format)
|
||||
description: |
|
||||
Retrieves file metadata in Google Gemini API format.
|
||||
|
||||
Note: This endpoint returns file metadata only. Direct file content
|
||||
download is not supported by Gemini Files API. Use the file.uri
|
||||
field from the response to access the file content.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileRetrieveResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
delete:
|
||||
operationId: geminiDeleteFile
|
||||
summary: Delete file (Gemini format)
|
||||
description: |
|
||||
Deletes a file in Google Gemini API format.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID to delete
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response (empty)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileDeleteResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
241
docs/openapi/paths/integrations/genai/generation.yaml
Normal file
241
docs/openapi/paths/integrations/genai/generation.yaml
Normal file
@@ -0,0 +1,241 @@
|
||||
# Google GenAI (Gemini) - Generation Endpoints
|
||||
|
||||
generate-content:
|
||||
post:
|
||||
operationId: geminiGenerateContent
|
||||
summary: Generate content (Gemini format)
|
||||
description: |
|
||||
Generates content using Google Gemini API format.
|
||||
The model is specified in the URL path.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: model
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Model name with action (e.g., gemini-pro:generateContent)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
stream-generate-content:
|
||||
post:
|
||||
operationId: geminiStreamGenerateContent
|
||||
summary: Stream generate content (Gemini format)
|
||||
description: |
|
||||
Streams content generation using Google Gemini API format.
|
||||
The model is specified in the URL path.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: model
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Model name with action (e.g., gemini-pro:streamGenerateContent)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful streaming response
|
||||
content:
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
embed-content:
|
||||
post:
|
||||
operationId: geminiEmbedContent
|
||||
summary: Embed content (Gemini format)
|
||||
description: |
|
||||
Creates embeddings using Google Gemini API format.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: model
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Model name with action (e.g., embedding-001:embedContent)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiEmbeddingRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiEmbeddingResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
count-tokens:
|
||||
post:
|
||||
operationId: geminiCountTokens
|
||||
summary: Count tokens (Gemini format)
|
||||
description: |
|
||||
Counts tokens using Google Gemini API format.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: model
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Model name with action (e.g., gemini-pro:countTokens)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiCountTokensRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiCountTokensResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
image-generation:
|
||||
post:
|
||||
operationId: geminiGenerateImage
|
||||
summary: Generate image (Gemini format)
|
||||
description: |
|
||||
For Imagen models, use the `:predict` suffix (e.g., `imagen-3.0-generate-001:predict`).
|
||||
For Gemini models, use `:generateContent` with `generationConfig.responseModalities: ["IMAGE"]` in the request body.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: model
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: |
|
||||
Model name with action suffix. For Imagen models, use `:predict` (e.g., `imagen-3.0-generate-001:predict`).
|
||||
For Gemini models with image generation, use `:generateContent` (e.g., `gemini-1.5-pro:generateContent`).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: |
|
||||
Successful response. Returns JSON with generated image data in `candidates[0].content.parts[0].inlineData`.
|
||||
When streaming, events are sent via Server-Sent Events (SSE).
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
45
docs/openapi/paths/integrations/genai/models.yaml
Normal file
45
docs/openapi/paths/integrations/genai/models.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
# Google GenAI (Gemini) - Models Endpoints
|
||||
|
||||
models:
|
||||
get:
|
||||
operationId: geminiListModels
|
||||
summary: List models (Gemini format)
|
||||
description: |
|
||||
Lists available models in Google Gemini API format.
|
||||
tags:
|
||||
- GenAI Integration
|
||||
parameters:
|
||||
- name: pageSize
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
description: Maximum number of models to return
|
||||
- name: pageToken
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Page token for pagination
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiListModelsResponse'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
Reference in New Issue
Block a user