{
  "info": {
    "name": "Shihab Voice API",
    "description": "Palestinian Arabic speech-to-text. Set the apiKey variable to your shk_live_ key. Docs: https://voice.shihab.co.uk/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.shihab.co.uk"
    },
    {
      "key": "apiKey",
      "value": "shk_live_..."
    },
    {
      "key": "jobId",
      "value": "tr_..."
    }
  ],
  "item": [
    {
      "name": "Transcribe",
      "item": [
        {
          "name": "Transcribe a file (sync)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "audio/mpeg"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/listen?numerals=false&timestamps=segment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "listen"
              ],
              "query": [
                {
                  "key": "numerals",
                  "value": "false"
                },
                {
                  "key": "timestamps",
                  "value": "segment"
                }
              ]
            },
            "body": {
              "mode": "file",
              "file": {
                "src": ""
              }
            },
            "description": "Raw audio body. Pick a file in Body > binary. Up to 30 minutes."
          }
        },
        {
          "name": "Transcribe a URL (sync)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/listen",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "listen"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/recordings/call.mp3\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Async transcriptions",
      "item": [
        {
          "name": "Create a job from a URL",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/transcriptions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "transcriptions"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/recordings/call.mp3\",\n  \"webhook_url\": \"https://example.com/hooks/shihab\",\n  \"metadata\": {\n    \"call_id\": \"1029\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "Get a job",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/transcriptions/{{jobId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "transcriptions",
                "{{jobId}}"
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "List jobs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/transcriptions?limit=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "transcriptions"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Delete a transcript",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/transcriptions/{{jobId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "transcriptions",
                "{{jobId}}"
              ],
              "query": []
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Streaming",
      "item": [
        {
          "name": "Create a temporary streaming token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/auth/grant",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "auth",
                "grant"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ttl_seconds\": 60\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Use the token on wss://api.shihab.co.uk/v1/listen/stream?token=sht_..."
          }
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "List models",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/models",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "models"
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "Usage",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/usage?granularity=day",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "usage"
              ],
              "query": [
                {
                  "key": "granularity",
                  "value": "day"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/balance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "balance"
              ],
              "query": []
            },
            "description": ""
          }
        }
      ]
    }
  ]
}
