Skip to main content
POST
/
organizations
/
{organization_name}
/
inference-endpoints
/
transcribe
/
jobs
Create a job for Salad Transcription API
curl --request POST \
  --url https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs \
  --header 'Content-Type: application/json' \
  --header 'Salad-Api-Key: <api-key>' \
  --data '
{
  "input": {
    "property1": "value1",
    "property2": "value2"
  },
  "metadata": {
    "property1": "value1",
    "property2": "value2"
  },
  "webhook": "https://webhooks.example.com:8080"
}
'
import requests

url = "https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs"

payload = {
"input": {
"property1": "value1",
"property2": "value2"
},
"metadata": {
"property1": "value1",
"property2": "value2"
},
"webhook": "https://webhooks.example.com:8080"
}
headers = {
"Salad-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: {property1: 'value1', property2: 'value2'},
metadata: {property1: 'value1', property2: 'value2'},
webhook: 'https://webhooks.example.com:8080'
})
};

fetch('https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'input' => [
'property1' => 'value1',
'property2' => 'value2'
],
'metadata' => [
'property1' => 'value1',
'property2' => 'value2'
],
'webhook' => 'https://webhooks.example.com:8080'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Salad-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs"

payload := strings.NewReader("{\n \"input\": {\n \"property1\": \"value1\",\n \"property2\": \"value2\"\n },\n \"metadata\": {\n \"property1\": \"value1\",\n \"property2\": \"value2\"\n },\n \"webhook\": \"https://webhooks.example.com:8080\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Salad-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs")
.header("Salad-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"property1\": \"value1\",\n \"property2\": \"value2\"\n },\n \"metadata\": {\n \"property1\": \"value1\",\n \"property2\": \"value2\"\n },\n \"webhook\": \"https://webhooks.example.com:8080\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"property1\": \"value1\",\n \"property2\": \"value2\"\n },\n \"metadata\": {\n \"property1\": \"value1\",\n \"property2\": \"value2\"\n },\n \"webhook\": \"https://webhooks.example.com:8080\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "inference_endpoint_name": "transcribe",
  "input": {
    "property1": "value1",
    "property2": "value2"
  },
  "metadata": null,
  "organization_name": "acme-corp",
  "status": "pending",
  "events": [],
  "create_time": "2024-05-01T19:00:00Z",
  "update_time": "2024-05-01T19:00:00Z"
}
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Bad Request",
"instance": "60907fdc"
}
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "Not Found",
"instance": "72ea5f29"
}
{
"type": "about:blank",
"title": "Too Many Requests",
"status": 409,
"detail": "Too Many Requests",
"instance": "cd6306ee"
}
{
"type": "about:blank",
"title": "Unknown Error",
"status": 500,
"detail": "Unknown Error",
"instance": "188f9bbb"
}
Last Updated: October 24, 2024

Authorizations

Salad-Api-Key
string
header
required

Path Parameters

organization_name
string
required

Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$

Body

application/json

Create a job for Salad Transcription API

input
object
required
metadata
object | null
webhook
string<url> | null

Response

Created

Job input schema for Salad Transcription API

id
string<uuid>
required
input
object
required
inference_endpoint_name
string
required

The inference endpoint name

status
enum<string>
required
Available options:
pending,
running,
succeeded,
cancelled,
failed
events
object[]
required
Maximum array length: 1000
organization_name
string
required

The organization name

create_time
string<date-time>
required
update_time
string<date-time>
required
metadata
object | null
webhook
string<url> | null
output
object