Skip to content

Commit

Permalink
update yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
eliteprox committed Aug 29, 2024
1 parent d7b60df commit f8a45d9
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 0 deletions.
99 changes: 99 additions & 0 deletions runner/gateway.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,49 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/segment-anything-2:
post:
summary: Segmentanything2
operationId: SegmentAnything2
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_SegmentAnything2_segment_anything_2_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MasksResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
components:
schemas:
APIError:
Expand All @@ -246,6 +289,45 @@ components:
- msg
title: APIError
description: API error response model.
Body_SegmentAnything2_segment_anything_2_post:
properties:
media_file:
type: string
format: binary
title: Media File
model_id:
type: string
title: Model Id
default: ''
point_coords:
type: string
title: Point Coords
point_labels:
type: string
title: Point Labels
box:
type: string
title: Box
mask_input:
type: string
title: Mask Input
multimask_output:
type: boolean
title: Multimask Output
default: true
return_logits:
type: boolean
title: Return Logits
default: true
normalize_coords:
type: boolean
title: Normalize Coords
default: true
type: object
required:
- media_file
- model_id
title: Body_SegmentAnything2_segment_anything_2_post
Body_audio_to_text_audio_to_text_post:
properties:
audio:
Expand Down Expand Up @@ -461,6 +543,23 @@ components:
- images
title: ImageResponse
description: Response model for image generation.
MasksResponse:
properties:
masks:
type: string
title: Masks
scores:
type: string
title: Scores
logits:
type: string
title: Logits
type: object
required:
- masks
- scores
- logits
title: MasksResponse
Media:
properties:
url:
Expand Down
98 changes: 98 additions & 0 deletions runner/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,49 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/segment-anything-2:
post:
summary: Segmentanything2
operationId: SegmentAnything2
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_SegmentAnything2_segment_anything_2_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MasksResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPError'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
components:
schemas:
APIError:
Expand All @@ -257,6 +300,44 @@ components:
- msg
title: APIError
description: API error response model.
Body_SegmentAnything2_segment_anything_2_post:
properties:
media_file:
type: string
format: binary
title: Media File
model_id:
type: string
title: Model Id
default: ''
point_coords:
type: string
title: Point Coords
point_labels:
type: string
title: Point Labels
box:
type: string
title: Box
mask_input:
type: string
title: Mask Input
multimask_output:
type: boolean
title: Multimask Output
default: true
return_logits:
type: boolean
title: Return Logits
default: true
normalize_coords:
type: boolean
title: Normalize Coords
default: true
type: object
required:
- media_file
title: Body_SegmentAnything2_segment_anything_2_post
Body_audio_to_text_audio_to_text_post:
properties:
audio:
Expand Down Expand Up @@ -476,6 +557,23 @@ components:
- images
title: ImageResponse
description: Response model for image generation.
MasksResponse:
properties:
masks:
type: string
title: Masks
scores:
type: string
title: Scores
logits:
type: string
title: Logits
type: object
required:
- masks
- scores
- logits
title: MasksResponse
Media:
properties:
url:
Expand Down

0 comments on commit f8a45d9

Please sign in to comment.