Run Intelligence

POST https://app.resemble.ai/api/v2/intelligence

Analyzes a media file and returns comprehensive intelligence. The API auto-detects whether the input is audio, video, or image.

By default the request is synchronous. If you provide a callback_url, the request becomes asynchronous automatically: the API returns 202 Accepted with the newly created intelligence record, then sends the final result to your callback URL with an outbound HTTP POST.

Request Body

FieldTypeRequiredDescription
media_tokenstringNo*Token for uploaded media file (from secure upload).
urlstringNo*HTTPS URL to media file.
detect_idstringNoUUID of an existing detect to associate.
media_typestringNoExplicit type: audio, image, or video (auto-detected if not provided).
jsonbooleanNoReturn description as JSON. Default: false for audio/video, true for images.
callback_urlstringNoURL that receives the final intelligence payload via HTTP POST. When present, the request runs asynchronously and returns 202 Accepted.

*One of media_token or url is required.

Example

$curl --request POST 'https://app.resemble.ai/api/v2/intelligence' \
> -H 'Authorization: Bearer YOUR_API_TOKEN' \
> -H 'Content-Type: application/json' \
> --data '{
> "url": "https://example.com/media/sample.wav",
> "json": true
> }'

Asynchronous Example (callback_url)

$curl --request POST 'https://app.resemble.ai/api/v2/intelligence' \
> -H 'Authorization: Bearer YOUR_API_TOKEN' \
> -H 'Content-Type: application/json' \
> --data '{
> "url": "https://example.com/media/sample.wav",
> "json": true,
> "callback_url": "https://example.com/webhooks/intelligence"
> }'

Response

Asynchronous Response (callback_url provided)

When callback_url is present, the API accepts the job immediately and returns a pending intelligence record:

1{
2 "success": true,
3 "item": {
4 "uuid": "abc123...",
5 "media_type": "audio",
6 "created_at": "2024-01-15T10:30:00Z"
7 }
8}

The final result is then delivered to your callback URL via HTTP POST.

Callback Payload

On success, the callback payload matches the normal intelligence response shape:

1{
2 "success": true,
3 "item": {
4 "uuid": "abc123...",
5 "media_type": "audio",
6 "description": {
7 "speaker_info": "Adult male speaker",
8 "language": "en",
9 "dialect": "en-US",
10 "emotion": "confident",
11 "speaking_style": "conversational",
12 "context": "Product marketing pitch",
13 "message": "Introducing a new feature",
14 "abnormalities": "No anomalies detected",
15 "transcription": "Welcome back to the Resemble product update...",
16 "translation": null,
17 "misinformation": "No misinformation detected"
18 },
19 "created_at": "2024-01-15T10:30:00Z"
20 }
21}

On failure, the callback includes the persisted intelligence record plus an error field:

1{
2 "success": false,
3 "item": {
4 "uuid": "abc123...",
5 "media_type": "audio",
6 "description": "Error generating Intelligence report.",
7 "created_at": "2024-01-15T10:30:00Z"
8 },
9 "error": "Gemini API request failed"
10}

Audio/Video Response (json=true)

1{
2 "success": true,
3 "item": {
4 "uuid": "abc123...",
5 "media_type": "audio",
6 "description": {
7 "speaker_info": "Adult male speaker",
8 "language": "en",
9 "dialect": "en-US",
10 "emotion": "confident",
11 "speaking_style": "conversational",
12 "context": "Product marketing pitch",
13 "message": "Introducing a new feature",
14 "abnormalities": "No anomalies detected",
15 "transcription": "Welcome back to the Resemble product update...",
16 "translation": null,
17 "misinformation": "No misinformation detected"
18 },
19 "created_at": "2024-01-15T10:30:00Z"
20 }
21}

Notes

  • One of media_token or url is required.
  • Requests without callback_url are processed synchronously and return 200 OK.
  • Requests with callback_url are processed asynchronously and return 202 Accepted.
  • Use Get Intelligence to poll for the final result if you do not want to rely on callbacks.

Image Response (json=true, default for images)

1{
2 "success": true,
3 "item": {
4 "uuid": "def456...",
5 "media_type": "image",
6 "description": {
7 "scene_description": "Detailed description of what the image depicts",
8 "subjects": "People, objects, locations identified in the image",
9 "authenticity_analysis": "Visual artifacts, manipulation indicators, AI generation signs",
10 "context_and_setting": "Environmental, temporal, situational context",
11 "abnormalities": "Visual anomalies indicating AI generation or manipulation",
12 "misinformation": "Misinformation and disinformation analysis results"
13 },
14 "created_at": "2024-01-15T10:30:00Z"
15 }
16}