From f8a45d987a52f75acd622bf5c3f6d8092ee05c90 Mon Sep 17 00:00:00 2001 From: Elite Encoder Date: Thu, 29 Aug 2024 01:05:14 -0400 Subject: [PATCH] update yaml --- runner/gateway.openapi.yaml | 99 +++++++++++++++++++++++++++++++++++++ runner/openapi.yaml | 98 ++++++++++++++++++++++++++++++++++++ 2 files changed, 197 insertions(+) diff --git a/runner/gateway.openapi.yaml b/runner/gateway.openapi.yaml index 811dcbcc..7a158c5a 100644 --- a/runner/gateway.openapi.yaml +++ b/runner/gateway.openapi.yaml @@ -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: @@ -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: @@ -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: diff --git a/runner/openapi.yaml b/runner/openapi.yaml index 7516cc30..65f2c47f 100644 --- a/runner/openapi.yaml +++ b/runner/openapi.yaml @@ -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: @@ -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: @@ -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: