{ "openapi": "3.1.0", "info": { "title": "Language Learning API", "version": "0.1.0" }, "paths": { "/api/pos/": { "post": { "tags": [ "api", "api", "pos" ], "summary": "Analyze Pos", "operationId": "analyze_pos_api_pos__post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/POSRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/POSResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/translate": { "get": { "tags": [ "api", "api", "translate" ], "summary": "Translate text to a target language", "operationId": "translate_text_api_translate_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "text", "in": "query", "required": true, "schema": { "type": "string", "title": "Text" } }, { "name": "target_language", "in": "query", "required": true, "schema": { "type": "string", "title": "Target Language" } }, { "name": "context", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Context" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranslationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/generate": { "post": { "tags": [ "api", "api" ], "summary": "Create Generation Job", "operationId": "create_generation_job_api_generate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerationRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/jobs/": { "get": { "tags": [ "api", "jobs" ], "summary": "Get Jobs", "operationId": "get_jobs_api_jobs__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobListResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/jobs/{job_id}": { "get": { "tags": [ "api", "jobs" ], "summary": "Get Job", "operationId": "get_job_api_jobs__job_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/jobs/{job_id}/regenerate-audio": { "post": { "tags": [ "api", "jobs" ], "summary": "Regenerate Audio", "operationId": "regenerate_audio_api_jobs__job_id__regenerate_audio_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Regenerate Audio Api Jobs Job Id Regenerate Audio Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/auth/register": { "post": { "tags": [ "auth" ], "summary": "Register", "operationId": "register_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/auth/login": { "post": { "tags": [ "auth" ], "summary": "Login", "operationId": "login_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/media/{filename}": { "get": { "tags": [ "media" ], "summary": "Get Media File", "operationId": "get_media_file_media__filename__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "filename", "in": "path", "required": true, "schema": { "type": "string", "title": "Filename" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "summary": "Health", "operationId": "health_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Health Health Get" } } } } } } } }, "components": { "schemas": { "GenerationRequest": { "properties": { "target_language": { "type": "string", "title": "Target Language" }, "complexity_level": { "type": "string", "title": "Complexity Level" }, "input_texts": { "items": { "type": "string" }, "type": "array", "title": "Input Texts" }, "topic": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Topic" }, "source_language": { "type": "string", "title": "Source Language", "default": "en" } }, "type": "object", "required": [ "target_language", "complexity_level", "input_texts" ], "title": "GenerationRequest" }, "GenerationResponse": { "properties": { "job_id": { "type": "string", "title": "Job Id" } }, "type": "object", "required": [ "job_id" ], "title": "GenerationResponse" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "JobListResponse": { "properties": { "jobs": { "items": { "$ref": "#/components/schemas/JobSummary" }, "type": "array", "title": "Jobs" } }, "type": "object", "required": [ "jobs" ], "title": "JobListResponse" }, "JobResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" }, "source_language": { "type": "string", "title": "Source Language" }, "target_language": { "type": "string", "title": "Target Language" }, "complexity_level": { "type": "string", "title": "Complexity Level" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "generated_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Generated Text" }, "translated_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Translated Text" }, "input_summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Input Summary" }, "audio_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audio Url" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": [ "id", "status", "source_language", "target_language", "complexity_level", "created_at" ], "title": "JobResponse" }, "JobSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "status", "created_at" ], "title": "JobSummary" }, "LoginRequest": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest" }, "POSRequest": { "properties": { "text": { "type": "string", "title": "Text" }, "language": { "type": "string", "title": "Language" } }, "type": "object", "required": [ "text", "language" ], "title": "POSRequest" }, "POSResponse": { "properties": { "language": { "type": "string", "title": "Language" }, "tokens": { "items": { "$ref": "#/components/schemas/TokenInfo" }, "type": "array", "title": "Tokens" } }, "type": "object", "required": [ "language", "tokens" ], "title": "POSResponse" }, "RegisterRequest": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "email", "password" ], "title": "RegisterRequest" }, "TokenInfo": { "properties": { "text": { "type": "string", "title": "Text" }, "lemma": { "type": "string", "title": "Lemma" }, "pos": { "type": "string", "title": "Pos" }, "tag": { "type": "string", "title": "Tag" }, "dep": { "type": "string", "title": "Dep" }, "is_stop": { "type": "boolean", "title": "Is Stop" } }, "type": "object", "required": [ "text", "lemma", "pos", "tag", "dep", "is_stop" ], "title": "TokenInfo" }, "TokenResponse": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type", "default": "bearer" } }, "type": "object", "required": [ "access_token" ], "title": "TokenResponse" }, "TranslationResponse": { "properties": { "text": { "type": "string", "title": "Text" }, "target_language": { "type": "string", "title": "Target Language" }, "translated_text": { "type": "string", "title": "Translated Text" } }, "type": "object", "required": [ "text", "target_language", "translated_text" ], "title": "TranslationResponse" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } }