Get Job
Retrieve a VideoShorts job with the Swiftia API
VideoShorts - Get Job
This endpoint retrieves the status and results of a VideoShorts job.
Endpoint
GET /api/jobs/{jobId}Path Parameters
- jobId(string, required): The unique identifier of the job, obtained from the Create Job response.
Response (In Progress)
{
  "jobId": "YOUR_JOB_ID",
  "status": "PROCESSING",
  "createdAt": "2024-12-06T12:34:56Z"
}Response (Completed - AI-Generated Shorts)
{
  "jobId": "YOUR_JOB_ID",
  "status": "COMPLETED",
  "createdAt": "2024-12-06T12:34:56Z",
  "cost": 0.41, // Cost of the job
  "data": {
    "transcription": { /* ... transcription data */ },
    "shorts": [
      {
        "id": 1,
        "title": "Auto-generated short title",
        "reason": "Reason for selecting this segment",
        "startId": 6, // Start index in transcription
        "endId": 13, // End index in transcription
        "startTime": 28.66, // Start time in seconds
        "endTime": 58.86, // End time in seconds
        "text": "Transcription of the short segment",
        "cropFileUrl": "URL to the cropped video file"
      },
      // ... more auto-generated shorts (max duration 1:30 each)
    ]
  }
}Response (Completed - User-Defined Shorts)
{
  "jobId": "YOUR_JOB_ID",
  "status": "COMPLETED",
  "createdAt": "2024-12-06T12:34:56Z",
  "cost": 0.41, // Cost of the job
  "data": {
    "transcription": { /* ... transcription data */ },
    "shorts": [
      {
        "id": 1,
        "title": "User-defined short title", // Title provided in request
        "startId": null, // Might be null for user-defined shorts
        "endId": null,   // Might be null for user-defined shorts
        "startTime": 5.0, // Start time provided in request
        "endTime": 30.0,  // End time provided in request
        "text": "Transcription of the short segment",
        "cropFileUrl": "URL to the cropped video file"
      },
      // ... more user-defined shorts (max duration 5:00 each)
    ]
  }
}Response Parameters
- jobId(string): The unique job identifier.
- status(string):- PROCESSING,- COMPLETED, or- FAILED.
- createdAt(string): Job creation timestamp.
- cost(number): The cost of the job (only present when- statusis- COMPLETED).
- data(object): Contains the results of the job (only present when- statusis- COMPLETED).- transcription(object): The transcription data for the video. (Details of this object will be provided in the data interfaces section).
- shorts(array): An array of generated shorts. Each short object has the following properties:- id(number): An identifier for the short.
- title(string): The title of the short.
- reason(string, only for AI-generated shorts): The reason why the AI selected this segment.
- startId(number, only for AI-generated shorts): Start index in the transcription.
- endId(number, only for AI-generated shorts): End index in the transcription.
- startTime(number): Start time of the short in seconds.
- endTime(number): End time of the short in seconds.
- text(string): The transcribed text of the short segment.
- cropFileUrl(string): The URL of the cropped video file.