Spaces:
Running
Running
openapi: 3.0.3 | |
info: | |
title: Pigeon AI | |
description: Pigeon AI | |
version: 1.0.0 | |
servers: | |
- url: 'https' | |
paths: | |
/api/task: | |
post: | |
summary: Create a task | |
operationId: createTask | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/youtubeLink' | |
responses: | |
'200': | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/task' | |
/api/task/{taskId}/status: | |
get: | |
summary: Get task status | |
operationId: getTask | |
parameters: | |
- name: taskId | |
in: path | |
required: true | |
description: task id | |
schema: | |
type: string | |
responses: | |
'200': | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/taskStatus' | |
'404': | |
description: Not Found | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/error' | |
components: | |
schemas: | |
youtubeLink: | |
type: object | |
properties: | |
youtubeLink: | |
type: string | |
description: youtube link | |
example: https://www.youtube.com/watch?v=5qap5aO4i9A | |
task: | |
type: object | |
properties: | |
taskId: | |
type: string | |
description: task id generated by uuid | |
example: 7a765280-1a72-47e4-8747-8a38cdbaca91 | |
taskStatus: | |
type: object | |
properties: | |
status: | |
type: string | |
description: task status | |
example: PROCESSING | |
error: | |
type: object | |
properties: | |
error: | |
type: string | |
description: error message | |
example: 'Invalid youtube link' |