AudioLasso Docs

API reference

OpenAPI reference for AudioLasso endpoints, schemas, and responses.

This reference is generated from the AudioLasso OpenAPI schema.

GET/v1/openapi.json

Response Body

curl -X GET "https://audiolasso.dev/v1/openapi.json"
Empty
GET/v1/models

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://audiolasso.dev/v1/models"
{
  "object": "list",
  "data": [
    {
      "id": "audio/separate",
      "object": "model",
      "description": "string",
      "input": {},
      "output": {}
    }
  ]
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
POST/v1/files

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://audiolasso.dev/v1/files" \  -H "Content-Type: application/json" \  -d '{    "file_name": "local-audio.wav",    "content_type": "audio/wav",    "file_size": 12345678,    "purpose": "audio.separate.input"  }'
{
  "file_id": "file_01jabc",
  "upload_url": "http://example.com",
  "upload_method": "PUT",
  "headers": {
    "content-type": "audio/wav"
  },
  "expires_at": "2019-08-24T14:15:22Z",
  "retention": {
    "delete_after": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
GET/v1/files/{file_id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

file_id*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://audiolasso.dev/v1/files/file_01jabc"
{
  "file_id": "string",
  "file_name": "string",
  "content_type": "string",
  "file_size": 0,
  "purpose": "string",
  "status": "pending",
  "created_at": "2019-08-24T14:15:22Z",
  "uploaded_at": "2019-08-24T14:15:22Z",
  "expires_at": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
POST/v1/queue/audio/separate

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://audiolasso.dev/v1/queue/audio/separate" \  -H "Content-Type: application/json" \  -d '{    "input": {      "prompt": "separate the piano from the background music"    }  }'
{
  "request_id": "req_01jabc",
  "status": "IN_QUEUE",
  "model": "audio/separate",
  "created_at": "2019-08-24T14:15:22Z",
  "status_url": "http://example.com",
  "stream_url": "http://example.com",
  "result_url": "http://example.com",
  "webhook": {
    "url": "http://example.com",
    "signing_secret": "whsec_..."
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
GET/v1/queue/requests/{request_id}/status

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

request_id*string

Query Parameters

logs?boolean
Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://audiolasso.dev/v1/queue/requests/req_01jabc/status"
{
  "request_id": "string",
  "model": "audio/separate",
  "status": "IN_QUEUE",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "result_url": "http://example.com",
  "logs": [
    {
      "timestamp": "2019-08-24T14:15:22Z",
      "message": "string"
    }
  ],
  "webhook": {
    "delivery_status": "pending",
    "attempts": 0,
    "delivered_at": "2019-08-24T14:15:22Z",
    "last_error": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
GET/v1/queue/requests/{request_id}/status/stream

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

request_id*string

Query Parameters

logs?boolean
Defaultfalse
interval?number

Polling interval in seconds while the SSE connection is open. Values are clamped from 1 to 10 seconds.

Default2
Range1 <= value <= 10

Response Body

text/event-stream

application/json

application/json

application/json

application/json

curl -X GET "https://audiolasso.dev/v1/queue/requests/req_01jabc/status/stream"
"event: status\\ndata: {\"request_id\":\"req_01jabc\",\"model\":\"audio/separate\",\"status\":\"IN_PROGRESS\"}\\n\\n"
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
GET/v1/queue/requests/{request_id}/result

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

request_id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://audiolasso.dev/v1/queue/requests/req_01jabc/result"
{
  "request_id": "string",
  "model": "audio/separate",
  "status": "COMPLETED",
  "data": {
    "target": {
      "url": "http://example.com",
      "video_url": "http://example.com",
      "content_type": "audio/wav",
      "file_name": "target.wav"
    },
    "residual": {
      "url": "http://example.com",
      "video_url": "http://example.com",
      "content_type": "audio/wav",
      "file_name": "target.wav"
    },
    "duration": 0,
    "sample_rate": 0
  },
  "usage": {
    "feature": "audio_seconds",
    "quantity": 0,
    "billing_status": "deducted"
  },
  "webhook": {
    "delivery_status": "pending",
    "attempts": 0,
    "delivered_at": "2019-08-24T14:15:22Z",
    "last_error": "string"
  },
  "retention": {
    "delete_after": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "code": "INVALID_AUDIO_URL",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

Example Requests

POST/audioSeparateCompleted

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

Example Requests

POST/audioSeparateFailed