---
updatedAt: 2025-10-14T07:47:34.000Z
agentTools:
  projectIndex: https://apidocs.neuronsinc.com/llms.txt
---

# Predict your video Ad performance

```shell cURL
curl  -X POST \
  'https://api.neuronsinc.com/predict/v2/videos' \
  --header 'X-API-Key: <<APIKey>>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "content_type": "video/mp4",
  "total_bytes": 6752031,
  "name": "video_ad"
}'


curl -i -X PUT --data-binary "@/path/to/file/video_ad.mp4" \
    -H "Content-Length: 6752031" \
    "https://storage.googleapis.com/upload/storage/o?uploadType=resumable&upload_id=<<upload_id>>"
  

curl  -X PUT \
  'https://api.neuronsinc.com/predict/v2/videos/VIDEO_ID/predict' \
  --header 'X-API-Key: <<APIKey>>'
  
  
curl  -X GET \
  'https://api.neuronsinc.com/predict/v2/media/VIDEO_ID' \
  --header 'X-API-Key: <<APIKey>>'
  
  
curl -X POST \ 
  'https://api.neuronsinc.com/predict/v2/videos/VIDEO_ID/scene_detection' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <<APIKey>>' \
  --data '{
    "scene_transition_frames": [ 353, 578 ]
  }'
```

```json Response Example
{
  "media_id": "0d1aeafa-d360-47c2-afaf-c6149281c202",
  "name": "video_ad",
  "status": "done",
  "type": "video",
  "aoi_status": "unspecified",
  "results": {
    "heat": "https://files.neuronsinc.com/media_nvai_heat.mp4",
    "fog": "https://files.neuronsinc.com/media_nvai_fog.mp4",
    "formatted": "https://files.neuronsinc.com/media_nvai_formatted.mp4",
    "brand_detection": "https://files.neuronsinc.com/nv-test/media_brand_detection.json?",
    "brand_detection_metrics": "https://files.neuronsinc.com/media_brand_detection_metrics.json?",
    "aoi_scores": null,
    "metrics": "https://files.neuronsinc.com/media_nvai_metrics.json"
  },
  "metrics": {
    "cognitive_demand": 91.73756099979508,
    "focus": 39.50367547395666,
    "focus_first_two": 68.92043509687068,
    "focus_last_two": 12.776237332510023
  },
  "created_at": "2024-01-19T09:05:44Z",
  "updated_at": "2024-01-19T09:36:49Z"
}

{
  "media_id": "0d1aeafa-d360-47c2-afaf-c6149281c202", 
  "success": true, 
  "message": "OK", 
  "results": {
    "684b309b-5c75-434f-8db7-3f94f1bdda75": {
      "start_frame": 1, 
      "end_frame": 352, 
      "focus": 80.50604034612387, 
      "cognitive_demand": 45.078818846324495, 
      "memory": 56.21344592314347, 
      "engagement_frt": 62.88968305369173, 
      "aois": []
    }, 
    "08244ec2-0e41-40ea-8341-364415c452a9": {
      "start_frame": 353, 
      "end_frame": 577, 
      "focus": 87.38416864131615, 
      "cognitive_demand": 47.39792340437856, 
      "memory": 58.96938118994907, 
      "engagement_frt": 59.803821352594724, 
      "aois": []
    }, 
    "f7b93f99-cd0a-4627-986e-a7b46644c3df": {
      "start_frame": 578, 
      "end_frame": 800, 
      "focus": 68.33355230263865, 
      "cognitive_demand": 72.30813829044762, 
      "memory": 72.1463888155716, 
      "engagement_frt": 49.55575712129309, 
      "aois": []
    }
  }
}
```

# Get your API Key

<!-- shell@3 -->

If you don't have an API key yet, reach out to your Customer Success Manager so that they can provide you one.

# Add video

<!-- shell@1-9 -->

Add your video ad and get the media_id and the resumable_url where you can upload your video.

# Upload the video

<!-- shell@12-14 -->

Use the resumable_url from the previous step to upload your video to the cloud service. Once the video is uploaded it will be ready for prediction.

# Run the video prediction

<!-- shell@18-20 -->

Now that you have your video uploaded, you're all set! You can now run the video prediction. Remember to use the media_id from step 2 to reference your video.

# Get your prediction results

<!-- shell@23-25 -->

After running the prediction, wait a few minutes for the calculations to take place, depending on the length of the video (it should not exceed 7 minutes). Your video metrics will be visible once the prediction is fully done.

# Get scene-by-scene metrics

<!-- shell@28-34 -->

Understand how your ad scenes perform by leveraging our scene detection.