{"openapi":"3.1.0","info":{"title":"Translation Gummy Online API","version":"1.0.0"},"paths":{"/healthz":{"get":{"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/session":{"post":{"summary":"Login","operationId":"login_api_v1_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Logout","operationId":"logout_api_v1_session_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me":{"get":{"summary":"Me","operationId":"me_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/translate":{"post":{"summary":"Translate Text","operationId":"translate_text_api_v1_translate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Translation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/v1/jobs/{job_id}/translate":{"post":{"summary":"Translate For Worker","operationId":"translate_for_worker_internal_v1_jobs__job_id__translate_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-worker-id","in":"header","required":true,"schema":{"type":"string","title":"X-Worker-Id"}},{"name":"x-job-lease","in":"header","required":true,"schema":{"type":"string","title":"X-Job-Lease"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Translation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status":{"get":{"summary":"Status","operationId":"status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/jobs":{"post":{"summary":"Submit","operationId":"submit_api_v1_jobs_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_api_v1_jobs_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"History","operationId":"history_api_v1_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_api_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel","operationId":"cancel_api_v1_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/audio":{"get":{"summary":"Audio Result","operationId":"audio_result_api_v1_jobs__job_id__audio_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/v1/heartbeat":{"post":{"summary":"Heartbeat","operationId":"heartbeat_internal_v1_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerState"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/v1/queue":{"get":{"summary":"Queue State","operationId":"queue_state_internal_v1_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/v1/claim":{"post":{"summary":"Claim","operationId":"claim_internal_v1_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerState"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/v1/jobs/{job_id}/{asset}":{"get":{"summary":"Input Asset","operationId":"input_asset_internal_v1_jobs__job_id___asset__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"asset","in":"path","required":true,"schema":{"enum":["input","profile","profile-text"],"type":"string","title":"Asset"}},{"name":"x-worker-id","in":"header","required":true,"schema":{"type":"string","title":"X-Worker-Id"}},{"name":"x-job-lease","in":"header","required":true,"schema":{"type":"string","title":"X-Job-Lease"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/v1/jobs/{job_id}/complete":{"post":{"summary":"Complete","operationId":"complete_internal_v1_jobs__job_id__complete_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_complete_internal_v1_jobs__job_id__complete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/v1/jobs/{job_id}/fail":{"post":{"summary":"Fail","operationId":"fail_internal_v1_jobs__job_id__fail_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerState"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_complete_internal_v1_jobs__job_id__complete_post":{"properties":{"worker_id":{"type":"string","title":"Worker Id"},"lease":{"type":"string","title":"Lease"},"result":{"type":"string","title":"Result"},"audio":{"type":"string","format":"binary","title":"Audio"},"reference":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Reference"}},"type":"object","required":["worker_id","lease","result","audio"],"title":"Body_complete_internal_v1_jobs__job_id__complete_post"},"Body_submit_api_v1_jobs_post":{"properties":{"text":{"type":"string","title":"Text","default":""},"target_language":{"type":"string","enum":["english","japanese"],"title":"Target Language","default":"english"},"operation":{"type":"string","enum":["translate","read_original"],"title":"Operation","default":"translate"},"audio":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Audio"}},"type":"object","title":"Body_submit_api_v1_jobs_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Login":{"properties":{"token":{"type":"string","maxLength":200,"minLength":32,"title":"Token"}},"type":"object","required":["token"],"title":"Login"},"Translation":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"target_language":{"type":"string","enum":["english","japanese"],"title":"Target Language"}},"type":"object","required":["text","target_language"],"title":"Translation"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkerState":{"properties":{"worker":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,80}$","title":"Worker"},"ready":{"type":"boolean","title":"Ready","default":false},"gpu":{"type":"string","maxLength":120,"title":"Gpu","default":""},"release":{"type":"string","maxLength":100,"title":"Release","default":""},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"lease":{"type":"string","title":"Lease","default":""}},"type":"object","required":["worker"],"title":"WorkerState"}}}}