modified_magicapi-whisper.json•6.46 kB
{
"openapi": "3.0.0",
"info": {
"title": "Image Processing API",
"version": "1.1.3",
"description": "API for sentece wise transcription and analysis of audio, using AI models."
},
"servers": [
{
"url": "http://api.magicapi.dev/api/v1/magicapi/whisper"
}
],
"paths": {
"magicapi/whisper/predictions/{request_id}": {
"get": {
"summary": "Get audio analysis URL",
"description": "This endpoint retrieves the URL of the transcription and analysis of the audio for the given request ID.\n",
"parameters": [
{
"name": "request_id",
"in": "path",
"required": true,
"description": "Unique identifier for the request.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Status of the prediction (e.g., \"succeeded\")."
},
"response_url": {
"type": "string",
"format": "uri",
"description": "URL of the audio's transcription and analysis."
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Description of the error."
}
}
}
}
}
}
},
"security": [
{
"apiKey": []
}
]
},
"parameters": [
{
"description": "API.market API Key",
"in": "header",
"name": "x-magicapi-key",
"value": "clp7flnx6000j3pifm3pinw92",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"magicapi/whisper/whisper": {
"post": {
"summary": "Whisper Audio Processing",
"description": "API for sentece wise transcription and analysis of audio, using AI models. Make sure to call get audio analysis URL with the request ID received from this API.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"audio": {
"type": "string",
"default": "https://replicate.delivery/mgxm/e5159b1b-508a-4be4-b892-e1eb47850bdc/OSR_uk_000_0050_8k.wav"
},
"model": {
"type": "string",
"default": "large-v3"
},
"translate": {
"type": "boolean",
"default": false
},
"temperature": {
"type": "integer",
"default": 0
},
"transcription": {
"type": "string",
"default": "plain text"
},
"suppress_tokens": {
"type": "string",
"default": -1
},
"logprob_threshold": {
"type": "integer",
"default": -1
},
"no_speech_threshold": {
"type": "integer",
"default": 0.6
},
"condition_on_previous_text": {
"type": "boolean",
"default": true
},
"compression_ratio_threshold": {
"type": "integer",
"default": 2.4
},
"temperature_increment_on_fallback": {
"type": "integer",
"default": 0.2
}
},
"required": [
"audio",
"model",
"translate",
"temperature",
"transcription",
"suppress_tokens",
"logprob_threshold",
"no_speech_threshold",
"condition_on_previous_text",
"compression_ratio_threshold",
"temperature_increment_on_fallback"
]
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "Unique identifier for the request."
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Description of the error."
}
}
}
}
}
}
},
"security": [
{
"apiKey": []
}
]
},
"parameters": [
{
"description": "API.market API Key",
"in": "header",
"name": "x-magicapi-key",
"value": "clp7flnx6000j3pifm3pinw92",
"required": true,
"schema": {
"type": "string"
}
}
]
}
},
"security": {},
"tags": []
}