Skip to main content

Syntonym API (0.3.0)

Download OpenAPI specification:Download

Syntonym backend API

default

Processing API

Job Status

Get status of a job. Returns 404 if job is not found.

path Parameters
job_id
required
string (Job Id)

Job ID

Responses

Response samples

Content type
application/json
{
  • "job_id": "string",
  • "status": 0,
  • "status_detail": "string"
}

Task Status

Get status of a task. Returns 404 if task is not found.

path Parameters
task_id
required
string (Task Id)

Task ID

Responses

Response samples

Content type
application/json
{
  • "task_id": "string",
  • "task_status": 0,
  • "status_detail": "string"
}

Cancel Job

Cancel a job and all its tasks. Updates DB status to cancelled. Backbone will receive cancellation message and stop video processing when it starts the job or proceeds to next progress update(every 10%). Image tasks will only be cancelled if it has not started processing yet. Cancelled tasks show status

path Parameters
job_id
required
string (Job Id)

Job ID

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Cancel Task

Cancel a task

path Parameters
task_id
required
string (Task Id)

Task ID

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete Job

Delete a job and all its tasks from DB and file storage. Job has to be in completed or cancelled state.

path Parameters
job_id
required
string (Job Id)

Job ID

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Process File

Process video or image file(s) with given parameter settings in;

Supported model names: ['syn', 'blur']

Supported configuration parameters for models:

syn:

  • "syntonymize": "true": syntonymize, "false": blur

  • "enable_lp": "true": enable license plate, "false": disable license plate

  • "lp_syntonymize": "true": syntonymize license plate, "false": blur license plate

blur:

  • "blur_face": "true" blur faces, "false" don't blur faces

  • "enable_lp": "true" blur license plates, "false" don't blur license plates

  • "blur_threshold": float (min 0.0, max 1.0)

  • "lp_threshold": float (min 0.0, max 1.0)

  1. A supported video in format: ['.mp4', '.mkv', '.webm', '.ts', '.mov', '.avi', '.mts'] or image in format ['.jpg', '.png', '.jpeg', '.bmp'].

  2. An archive file in one of the supported formats: ['.zip', '.rar', '.7z'].

If the file is an archive file, it will be extracted and all the files in the archive will be processed.

Nesting in archive is not supported. Files must be in the root directory of the archive.

Processing won't start until the job is approved with /approve_job.

Request Body schema: application/json
required
file_path
string (File Path)
Default: "/syntonym/jobs/sample.zip"

File name

model
string (Model)
Default: "blur"

Supported models: ['syn', 'blur']

required
BlurConfig (object) or SynConfig (object) or Model Config (string) (Model Config)

Responses

Request samples

Content type
application/json
{
  • "file_path": "/syntonym/jobs/sample.zip",
  • "model": "blur",
  • "model_config": {
    }
}

Response samples

Content type
application/json
{
  • "job_id": "string",
  • "status": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "input_file": "string",
  • "tasks": [
    ],
  • "has_errors": false,
  • "is_approved": false,
  • "cancelled": false
}

Process Video

Process video file(s) with given parameter settings in;

Supported model names: ['syn', 'blur']

Supported configuration parameters for models:

syn:

  • "syntonymize": "true": syntonymize, "false": blur

  • "enable_lp": "true": enable license plate, "false": disable license plate

  • "lp_syntonymize": "true": syntonymize license plate, "false": blur license plate

blur:

  • "blur_face": "true" blur faces, "false" don't blur faces

  • "enable_lp": "true" blur license plates, "false" don't blur license plates

  • "blur_threshold": float (min 0.0, max 1.0)

  • "lp_threshold": float (min 0.0, max 1.0)

  1. A supported video in format: ['.mp4', '.mkv', '.webm', '.ts', '.mov', '.avi', '.mts'].

  2. An archive file in one of the supported formats: ['.zip', '.rar', '.7z'].

If the file is an archive file, it will be extracted and all the files in the archive will be processed.

Nesting in archive is not supported. Files must be in the root directory of the archive.

Processing won't start until the job is approved with /approve_job.

Request Body schema: application/json
required
file_path
string (File Path)
Default: "/syntonym/jobs/sample3.mp4"

File name

model
string (Model)
Default: "blur"

Supported models: ['syn', 'blur']

required
BlurConfig (object) or SynConfig (object) or Model Config (string) (Model Config)

Responses

Request samples

Content type
application/json
{
  • "file_path": "/syntonym/jobs/sample3.mp4",
  • "model": "blur",
  • "model_config": {
    }
}

Response samples

Content type
application/json
{
  • "job_id": "string",
  • "status": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "input_file": "string",
  • "tasks": [
    ],
  • "has_errors": false,
  • "is_approved": false,
  • "cancelled": false
}

Process Image

Process image file(s) with given parameter settings in;

Supported model names: ['syn', 'blur']

Supported configuration parameters for models:

syn:

  • "syntonymize": "true": syntonymize, "false": blur

  • "enable_lp": "true": enable license plate, "false": disable license plate

  • "lp_syntonymize": "true": syntonymize license plate, "false": blur license plate

blur:

  • "blur_face": "true" blur faces, "false" don't blur faces

  • "enable_lp": "true" blur license plates, "false" don't blur license plates

  • "blur_threshold": float (min 0.0, max 1.0)

  • "lp_threshold": float (min 0.0, max 1.0)

  1. A supported image in format: ['.jpg', '.png', '.jpeg', '.bmp'].

  2. An archive file in one of the supported formats: ['.zip', '.rar', '.7z'].

If the file is an archive file, it will be extracted and all the files in the archive will be processed.

Nesting in archive is not supported. Files must be in the root directory of the archive.

Processing won't start until the job is approved with /approve_job.

Request Body schema: application/json
required
file_path
string (File Path)
Default: "/syntonym/jobs/sample.jpg"

File name

model
string (Model)
Default: "blur"

Supported models: ['syn', 'blur']

required
BlurConfig (object) or SynConfig (object) or Model Config (string) (Model Config)

Responses

Request samples

Content type
application/json
{
  • "file_path": "/syntonym/jobs/sample.jpg",
  • "model": "blur",
  • "model_config": {
    }
}

Response samples

Content type
application/json
{
  • "job_id": "string",
  • "status": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "input_file": "string",
  • "tasks": [
    ],
  • "has_errors": false,
  • "is_approved": false,
  • "cancelled": false
}

Approve Job

Approve a user's job with enough credits for processing

path Parameters
job_id
required
string (Job Id)

Job ID

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}