### Streaming Source Analysis Example Source: https://docs.probe.dev/quickstart An example cURL request to analyze a streaming media source, specifically an HLS playlist, using the Probe.dev API with the 'mediainfo' option. ```bash curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=mediainfo" \ --data-urlencode "url=https://probelibrary.s3.amazonaws.com/hls/sample/big_buck_bunny.m3u8" ``` -------------------------------- ### Minimal Request Example Source: https://docs.probe.dev/quickstart A basic cURL request to probe a file using the Probe.dev API. It demonstrates how to pass the API token and the URL of the media file. ```bash curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=ffprobe" \ --data-urlencode "url=https://probelibrary.s3.amazonaws.com/sample-source.mp4" ``` -------------------------------- ### Provide Media Asset via URL (JSON) Source: https://docs.probe.dev/quickstart Demonstrates how to specify a media asset using a direct URL within a JSON payload for the Probe.dev API. ```json { "url": "https://probelibrary.s3.amazonaws.com/sample-source.mp4" } ``` -------------------------------- ### Probe.dev API Endpoint and Methods Source: https://docs.probe.dev/quickstart Details the primary API endpoint for probing media files and the supported HTTP methods (GET/POST) based on payload size and complexity. ```APIDOC API Endpoint: https://api.probe.dev/v1/probe/file Methods: GET: Parameters in: Query string Use when: Small payloads, quick tests POST: Parameters in: Body (multipart/form-data, application/x-www-form-urlencoded, or application/json) Use when: Large payloads or many options ``` -------------------------------- ### Probe.dev Authentication Methods Source: https://docs.probe.dev/quickstart Explains the recommended authentication methods for the Probe.dev API, including using a Bearer token in the Authorization header or a token query parameter. ```APIDOC Authentication: Method: Header (recommended) Example: `Authorization: Bearer $PROBE_API_TOKEN` Notes: Keeps secrets out of URLs & logs Method: Query string Example: `?token=$PROBE_API_TOKEN` Notes: Handy for quick cURL tests ``` -------------------------------- ### Analyze HLS Stream Example Source: https://docs.probe.dev/api-reference/introduction Example of analyzing an HLS stream using a GET request. It specifies the stream URL and requests only MediaInfo output. ```bash curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=YOUR_API_TOKEN" \ --data-urlencode "url=https://probelibrary.s3.amazonaws.com/hls/sample/big_buck_bunny.m3u8" \ --data-urlencode "only=mediainfo" ``` -------------------------------- ### Analyze RTMP Stream Example Source: https://docs.probe.dev/api-reference/introduction Example of analyzing an RTMP stream using a GET request. It specifies the stream URL and requests only FFprobe output. ```bash curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=YOUR_API_TOKEN" \ --data-urlencode "url=rtmp://matthewc.co.uk/vod/scooter" \ --data-urlencode "only=ffprobe" ``` -------------------------------- ### Cursor MCP Configuration for Probe.dev Source: https://docs.probe.dev/guides/mcp-integration Provides an example of the `mcp.json` file configuration for Cursor to connect to the Probe.dev hosted MCP server, including the server URL and authentication headers. ```json { "mcpServers": { "probe-dev": { "url": "https://mcp.probe.dev/", "headers": { "Authorization": "Bearer your-api-token-here" } } } } ``` -------------------------------- ### Probe API File Analysis Example Source: https://docs.probe.dev/reference/sample-media-library Demonstrates how to use the Probe.dev API to perform a complete analysis of a media file using ffprobe, mediainfo, and probe_report tools. This example uses curl to send a GET request with various parameters to the API endpoint. ```APIDOC Probe API File Analysis: GET /v1/probe/file Description: Performs a comprehensive analysis of a media file by enabling multiple analysis tools. Parameters: - token (string, required): Your Probe.dev API authentication token. - inject_json (boolean, optional): If true, injects JSON output into the response. - url (string, required): The URL of the media file to analyze. - ffprobe[enabled] (boolean, optional): Enables the ffprobe analysis tool. - mediainfo[enabled] (boolean, optional): Enables the mediainfo analysis tool. - probe_report[enabled] (boolean, optional): Enables the generation of a probe report. Example Usage: curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "inject_json=true" \ --data-urlencode "url=https://probelibrary.s3.amazonaws.com/samples/MPEG-4/mp4video_mp3audio.mp4" \ --data-urlencode "ffprobe[enabled]=true" \ --data-urlencode "mediainfo[enabled]=true" \ --data-urlencode "probe_report[enabled]=true" Related Endpoints: - POST /v1/probe/upload: Upload a file for analysis. - GET /v1/probe/file/{file_id}: Retrieve analysis results for a specific file. ``` -------------------------------- ### Probe.dev Auth API: Get API Token (cURL Example) Source: https://docs.probe.dev/api-reference/auth/get-api-token Example of how to fetch API token details using cURL, demonstrating the GET request to the /auth/api-token/{token} endpoint with necessary headers. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/auth/api-token/{token} \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Migrate MediaInfo to Probe.dev API (cURL) Source: https://docs.probe.dev/guides/migration-guide Shows how to replace a local MediaInfo command-line execution with a cURL request to the Probe.dev API. This example uses common parameters for media analysis. ```bash # Local execution mediainfo --Output=JSON /path/to/video.mp4 ``` ```bash # Equivalent call through the Probe API curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=mediainfo" \ --data-urlencode "url=https://example.com/video.mp4" ``` -------------------------------- ### Analyze DASH Manifest Example Source: https://docs.probe.dev/api-reference/introduction Example of analyzing a DASH manifest using a GET request. It specifies the manifest URL and requests JSON injection for detailed parsing. ```bash curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=YOUR_API_TOKEN" \ --data-urlencode "url=https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd" \ --data-urlencode "inject_json=true" ``` -------------------------------- ### Create API Token Response Example Source: https://docs.probe.dev/api-reference/auth/create-api-token Example of a successful response when creating an API token. ```json { "created": "2023-11-07T05:31:56Z", "expired": null, "expires-at": null, "permissions": {}, "token": "", "updated": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Get API Key Example Source: https://docs.probe.dev/index This snippet shows how to obtain an API key from the Probe.dev dashboard, a necessary step for authenticating API requests. ```bash # Navigate to the Probe.dev dashboard # Sign up or log in # Find the 'API Keys' section # Click 'Generate New API Key' # Copy the generated key for use in API requests. # Example of using the API key in a curl command: # curl -X GET https://api.probe.dev/v1/users/me \ # -H "Authorization: Bearer YOUR_GENERATED_API_KEY" ``` -------------------------------- ### Get Usage Summary Example Source: https://docs.probe.dev/api-reference/statistics/usage-summary Demonstrates how to retrieve the usage summary statistics using a GET request. Includes the cURL command and the expected JSON response structure. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/statistics/summary \ --header 'Authorization: Bearer ' ``` ```json { "period": { "from": null, "to": null }, "users-usage": [ { "resources": [ { "amount": null, "name": "", "price": null, "title": null, "value": null, "value-type": null } ], "user-id": 1 } ] } ``` -------------------------------- ### Get list of active sessions (Response Example) Source: https://docs.probe.dev/api-reference/auth/get-list-of-active-sessions-1 Example JSON response structure for a successful request to get active session details. ```JSON { "created": "2023-11-07T05:31:56Z", "expire": "2023-11-07T05:31:56Z", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "remote-ip": "", "ua-type": "", "user-agent": "" } ``` -------------------------------- ### Sign-in Response Example Source: https://docs.probe.dev/api-reference/auth/authenticate-user-by-usernameemail-and-password Example JSON response received after a successful user authentication. ```json { "api-token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "current-user": null, "email": "", "jwt-token": { "expire": "2024-11-01T16:39:02Z", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.zzzzzzzzzzzzzzzzzzz-zzzzzzzzzzzzzzzzzzzzzzz" }, "oauth-provider-tokens": [ { "provider": "", "token": "" } ], "ret-url": null, "status": "anonymous", "user-id": 1 } ``` -------------------------------- ### Analyze HLS Playlist with Probe.dev API Source: https://docs.probe.dev/reference/sample-media-library This example demonstrates how to use the Probe.dev API to analyze an HLS playlist. It sends a GET request to the /v1/probe/file endpoint, specifying the HLS URL and requesting only 'mediainfo' output. ```shell curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=mediainfo" \ --data-urlencode "url=https://probelibrary.s3.amazonaws.com/hls/sample/big_buck_bunny.m3u8" ``` -------------------------------- ### Verify Sign-up email (Response Example) Source: https://docs.probe.dev/api-reference/auth/verify-sign-up-email Example of a successful JSON response after verifying a sign-up email. ```json { "email": "", "status": "anonymous", "success": true } ``` -------------------------------- ### Get list of active sessions (cURL Example) Source: https://docs.probe.dev/api-reference/auth/get-list-of-active-sessions-1 Example of how to fetch details for a specific active session using cURL, including authentication headers. ```cURL curl --request GET \ --url https://{host}/frontend/api/v1/auth/session/{session-id} \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Create API Token cURL Example Source: https://docs.probe.dev/api-reference/auth/create-api-token Example of how to create an API token using cURL, specifying permissions and TTL. ```curl curl --request POST \ --url https://{host}/frontend/api/v1/auth/api-token \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "permissions": [ "read:billing" ], "ttl": 0 }' ``` -------------------------------- ### Analyze Media File Example Source: https://docs.probe.dev/api-reference/introduction Example of analyzing a standard media file using a POST request. It specifies the file URL and enables detailed analysis from FFprobe, MediaInfo, and Probe Report. ```bash curl -X POST https://api.probe.dev/v1/probe/file \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ \ "url": "https://probelibrary.s3.amazonaws.com/sample-source.mp4", \ "inject_json": true, \ "ffprobe": { \ "enabled": true, \ "show_streams": true, \ "show_format": true \ }, \ "mediainfo": { \ "enabled": true, \ "output": "JSON" \ }, \ "probe_report": { \ "enabled": true, \ "diff": true \ } \ }' ``` -------------------------------- ### cURL Example for Listing Media Requests Source: https://docs.probe.dev/api-reference/media/list-media-requests-log Example of how to call the List Media Requests Log API using cURL, including authorization header. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/media/log \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Verify Sign-up email (cURL Example) Source: https://docs.probe.dev/api-reference/auth/verify-sign-up-email Example of how to verify a sign-up email using a POST request with cURL. It includes necessary headers and a JSON payload. ```curl curl --request POST \ --url https://{host}/frontend/api/v1/auth/verify \ --header 'Content-Type: application/json' \ --header 'X-Recaptcha-Token: ' \ --data '{ \ "verify-token": "" \ }' ``` -------------------------------- ### Create Cursor MCP Configuration File Source: https://docs.probe.dev/guides/mcp-integration Command to create an empty `mcp.json` file for Cursor's MCP configuration. ```bash touch ~/.cursor/mcp.json ``` -------------------------------- ### cURL Example for Sign-in Source: https://docs.probe.dev/api-reference/auth/authenticate-user-by-usernameemail-and-password Example cURL command to authenticate a user by sending a POST request to the sign-in API endpoint with a JSON payload. ```curl curl --request POST \ --url https://{host}/frontend/api/v1/auth/sign-in \ --header 'Content-Type: application/json' \ --data '{ \ "current-user": null, \ "email": "jsmith@example.com", \ "logout-other": false, \ "long-term-token": true, \ "password": "", \ "ret-url": null \ }' ``` -------------------------------- ### Generate JWT Token Request Example Source: https://docs.probe.dev/api-reference/auth/generate-new-jwt-token Example of how to call the JWT generation API using cURL, including authorization and request body. ```bash curl --request POST \ --url https://{host}/frontend/api/v1/auth/jwt \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ \ "claims": {}, \ "long-term-token": true, \ "permissions": [ \ "read:billing" \ ] \ }' ``` -------------------------------- ### Presigned S3 URL Example Source: https://docs.probe.dev/guides/media-sources Example of a presigned URL for temporary, secure access to a private S3 object. ```JSON { "url": "https://my-bucket.s3.amazonaws.com/sample-video.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20250506%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250506T121314Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=9a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1" } ``` -------------------------------- ### Usage Statistics Response Example Source: https://docs.probe.dev/api-reference/statistics/usage-statistics Example JSON response structure for the usage statistics endpoint, showing aggregated usage data per user. ```json { "aggregation": "no-aggregation", "period": { "from": null, "to": null }, "users-usage": [ { "aggregated-usage": [ { "aggregation-time": "2023-11-07T05:31:56Z", "resources": {} } ], "user-id": 1 } ] } ``` -------------------------------- ### Key-Based S3 Authorization Example Source: https://docs.probe.dev/guides/media-sources Example of an S3 URL incorporating AWS access key and secret for private object access. ```JSON { "url": "https://AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY@s3.amazonaws.com/my-bucket/video.mp4" } ``` -------------------------------- ### Update User Profile Response Example Source: https://docs.probe.dev/api-reference/user/update-user-profile Example of a successful response (200 OK) when updating a user profile. ```APIDOC { "additional-emails": [ "" ], "created": "2023-11-07T05:31:56Z", "email": "theUser@probe.dev", "first-name": "J", "id": 1, "last-name": "Doe", "parent": { "email": "theUser@probe.dev", "id": 1, "role": "root", "status": "anonymous", "username": "theUser" }, "permissions": {}, "plan": { "expires": "2023-11-07T05:31:56Z", "id": 1, "name": "" }, "role": "root", "status": "anonymous", "updated": "2023-11-07T05:31:56Z", "username": "theUser" } ``` -------------------------------- ### Requests Statistics Response Example Source: https://docs.probe.dev/api-reference/statistics/requests-statistics Provides an example of the JSON payload returned when successfully fetching request statistics. ```json { "aggregation": "no-aggregation", "period": { "from": null, "to": null }, "users-usage": [ { "aggregated-usage": [ { "aggregation-time": "2023-11-07T05:31:56Z", "resources": {} } ], "user-id": 1 } ] } ``` -------------------------------- ### OAuth Sign-In API Response Example Source: https://docs.probe.dev/api-reference/auth/authenticate-user-by-oauth-provider-token An example of a successful JSON response from the OAuth sign-in API endpoint. It includes an API token, JWT token with expiration, user status, and authentication check results. ```json { "api-token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "check-auth-result": { "message": "", "ok": true }, "current-user": null, "email": "", "jwt-token": { "expire": "2024-11-01T16:39:02Z", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.zzzzzzzzzzzzzzzzzzz-zzzzzzzzzzzzzzzzzzzzzzz" }, "oauth-provider-tokens": [ { "provider": "", "token": "" } ], "ret-url": null, "status": "anonymous", "user-id": 1 } ``` -------------------------------- ### JavaScript: Compatibility Check Example Source: https://docs.probe.dev/reference/probe-report-parameters Determines if a video stream is compatible with web playback, checking for H.264 codec and 4:2:0 chroma subsampling. ```javascript const isWebCompatible = probe.codec.name === 'h264' && probe.pixel_format.chroma_subsampling === '4:2:0'; ``` -------------------------------- ### Create Cursor MCP Configuration Directory Source: https://docs.probe.dev/guides/mcp-integration Command to create the necessary directory structure for Cursor's MCP configuration file. ```bash mkdir -p ~/.cursor ``` -------------------------------- ### JavaScript: Quality Analysis Example Source: https://docs.probe.dev/reference/probe-report-parameters Calculates encoding quality by dividing the average bitrate by the total number of pixels in a frame. ```javascript const efficiency = probe.bitrate.average / (probe.size.width * probe.size.height); ``` -------------------------------- ### Probe.dev API - Example Response Structure Source: https://docs.probe.dev/api-reference/media/request-mediastreamvalidator-report-as-url-query-method Illustrates a typical JSON response structure for API requests, including success status, output, and metadata. ```JSON { "cli_output": null, "error": null, "metadata": { "duration": null, "io_usage": null, "queue_time": null, "request_id": null, "usage": null }, "output": "", "success": true } ``` -------------------------------- ### HLS Stream Analysis Results Source: https://docs.probe.dev/guides/media-sources Example JSON output detailing HLS stream characteristics, including variant streams and media segment information. ```JSON { "master_playlist": { "variant_streams": [ { "bandwidth": 1200000, "resolution": "1280x720", "codecs": "avc1.4d401f,mp4a.40.2", "uri": "720p.m3u8" } ] }, "media_segments": { "target_duration": 10, "sequence_number": 0, "segments_count": 180 } } ``` -------------------------------- ### Probe.dev API Reference Source: https://docs.probe.dev/guides/migration-guide Documentation for the Probe.dev API, detailing the /probe/file endpoint for media analysis requests. Includes parameters for specifying analysis tools, output formats, and callback URLs. ```APIDOC POST /v1/probe/file Initiates media analysis for a given file URL. Parameters: token (string, required): Your Probe.dev API token for authentication. url (string, required): The URL of the media file to analyze. only (string, optional): Specifies which analysis tool to run (e.g., 'ffprobe', 'mediainfo'). If omitted, all enabled tools run. webhook_url (string, optional): A URL to send the analysis results to upon completion. ffprobe (object, optional): Configuration for FFprobe analysis. enabled (boolean, optional): Whether to enable FFprobe analysis. Defaults to false. only (string, optional): Specific FFprobe flags or options to include. Consult FFprobe documentation. mediainfo (object, optional): Configuration for MediaInfo analysis. enabled (boolean, optional): Whether to enable MediaInfo analysis. Defaults to false. only (string, optional): Specific MediaInfo options or output formats. Consult MediaInfo documentation. inject_json (boolean, optional): If true, combines outputs from multiple tools into a single JSON object. Defaults to false. Returns: object: An object containing the status of the analysis request. id (string): A unique identifier for the analysis job. status (string): The current status of the job (e.g., 'queued', 'processing', 'completed', 'failed'). Example Request: { "token": "YOUR_API_TOKEN", "url": "http://example.com/media.mp4", "only": "ffprobe", "webhook_url": "https://myapp.com/webhook", "ffprobe": { "enabled": true, "only": "-v quiet -print_format json -show_format" } } Related Methods: - GET /v1/probe/status/{id}: Retrieve the status of a specific analysis job. - GET /v1/probe/result/{id}: Retrieve the analysis results for a completed job (if webhook_url was not used). ``` -------------------------------- ### Migrate FFprobe to Probe.dev API (PHP) Source: https://docs.probe.dev/guides/migration-guide Demonstrates migrating a local FFprobe execution in PHP to an equivalent API call to Probe.dev. It preserves FFprobe parameters and shows how to handle the API response. ```php // Local execution exec( 'ffprobe -i ' . escapeshellarg($url) . " -print_format json -probesize $probesize" . " -analyzeduration $analyzeduration -max_probe_packets $max_probe_packets" . ' -show_format -show_streams', $output ); ``` ```php // Equivalent call through the Probe API $token = getenv('PROBE_API_TOKEN'); $query = http_build_query([ 'token' => $token, 'url' => $url, 'only' => 'ffprobe', 'ffprobe[output_format]' => 'json', 'ffprobe[probesize]' => $probesize, 'ffprobe[analyzeduration]' => $analyzeduration, 'ffprobe[max_probe_packets]' => $max_probe_packets, 'ffprobe[show_format]' => 'true', 'ffprobe[show_streams]' => 'true', ]); $response = file_get_contents("https://api.probe.dev/v1/probe/file?$query"); $output = json_decode($response, true); ``` -------------------------------- ### Probe.dev API: FFprobe & MediaInfo Parameter Mapping Source: https://docs.probe.dev/guides/migration-guide Details the mapping of common local FFprobe and MediaInfo command-line parameters to their equivalent Probe.dev API query parameters. This facilitates direct translation of existing analysis commands. ```APIDOC Probe.dev API: FFprobe Parameter Mapping Maps local FFprobe arguments to Probe.dev API parameters. Local FFprobe Parameter | Probe.dev API Parameter | Description ------------------------|-------------------------|------------ -print_format json | ffprobe[output_format]=json | Specifies the output format. -show_format | ffprobe[show_format]=true | Includes container information. -show_streams | ffprobe[show_streams]=true | Includes stream-specific information. -probesize 1000000 | ffprobe[probesize]=1000000 | Sets the probe buffer size. -analyzeduration 5000000| ffprobe[analyzeduration]=5000000 | Sets the analysis duration. ``` ```APIDOC Probe.dev API: MediaInfo Parameter Mapping Maps local MediaInfo arguments to Probe.dev API parameters. Local MediaInfo Parameter | Probe.dev API Parameter | Description --------------------------|-------------------------|------------ --Output=JSON | mediainfo[output]=JSON | Sets the output format to JSON. --Full | mediainfo[full]=true | Requests complete information. --Language=raw | mediainfo[language]=raw | Sets the language for output to raw. ``` -------------------------------- ### Probe.dev AI Assistant Tools Source: https://docs.probe.dev/guides/mcp-integration Documentation for tools available to the AI assistant, enabling functionalities like searching documentation, analyzing media files, retrieving usage statistics, and accessing request logs. ```apidoc Tool: search Description: Search across all Probe.dev documentation Example: "How do I authenticate with the API?" Tool: analyze_media_file Description: Analyze media files using FFprobe, MediaInfo, or Probe Report Example: "Analyze this video file: https://example.com/video.mp4" Tool: get_usage_stats Description: Retrieve API usage statistics and metrics Example: "Show my current API usage this month" Tool: get_request_logs Description: Access your API request history and logs Example: "Show my recent failed requests" Basic Test Example: "Can you search the Probe.dev documentation for authentication information?" Document Search Example: "Find information about rate limits in the Probe.dev API" → Returns: Rate limit documentation with specific limits and headers Media Analysis Example: "Analyze this video and tell me its codec, resolution, and duration: https://example.com/sample.mp4" → Returns: Complete FFprobe analysis with video/audio stream details Batch Operations Example: "Compare the codecs used in these three video files: - https://example.com/video1.mp4 - https://example.com/video2.mkv - https://example.com/video3.avi" → Returns: Analysis of all three files with codec comparison API Management Example: "Show me my API usage for the last week and identify any failed requests" → Returns: Usage statistics and error log analysis ``` -------------------------------- ### Get Usage Statistics (cURL) Source: https://docs.probe.dev/api-reference/statistics/usage-statistics Example of how to retrieve usage statistics using a cURL command. Requires an authorization token. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/statistics/usage \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Analyze DASH Manifest with Probe.dev API Source: https://docs.probe.dev/reference/sample-media-library This example shows how to analyze a DASH manifest using the Probe.dev API. It targets the /v1/probe/file endpoint, providing the DASH manifest URL and requesting JSON output injection. ```shell curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "inject_json=true" \ --data-urlencode "url=https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd" ``` -------------------------------- ### Get User by ID cURL Request Source: https://docs.probe.dev/api-reference/user/get-user-by-id Example cURL command to fetch a user's profile by ID from the frontend API. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/user/{user-id} ``` -------------------------------- ### Probe.dev API Reference - File Analysis Source: https://docs.probe.dev/guides/migration-guide Documentation for the Probe.dev API endpoint used for file analysis. It details the request parameters, including authentication, file source, and tool-specific options for FFprobe and MediaInfo. ```APIDOC Endpoint: GET /v1/probe/file Description: Analyzes a media file from a given URL using specified tools (FFprobe, MediaInfo). Authentication: - token: Your Probe.dev API token (required). Parameters: - url: The URL of the media file to analyze (required). - only: Specifies which tool to use for analysis. Options: 'ffprobe', 'mediainfo', or a comma-separated list (e.g., 'ffprobe,mediainfo'). If omitted, both are run. FFprobe Specific Parameters (prefixed with 'ffprobe[key]'): - ffprobe[output_format]: Output format for FFprobe (e.g., 'json', 'xml', 'csv', 'flat', 'ini', 'json', 'pb', 'printer_json', 'text', 'xml'). Defaults to 'json'. - ffprobe[probesize]: Size in bytes of the buffer allocated for probing the input. Defaults to 2MB. - ffprobe[analyzeduration]: Duration in seconds to analyze. Defaults to 10s. - ffprobe[max_probe_packets]: Maximum number of packets to probe. Defaults to 5000. - ffprobe[show_format]: Whether to show format information. 'true' or 'false'. - ffprobe[show_streams]: Whether to show stream information. 'true' or 'false'. - ... (all valid FFprobe flags can be passed with the 'ffprobe[]' prefix) MediaInfo Specific Parameters: - No specific parameters beyond 'only' and 'url' are directly passed to MediaInfo via this endpoint. MediaInfo's output format is typically JSON by default when used via the API. Returns: - A JSON object containing the analysis results from the requested tools. - Example structure: { "ffprobe": { ... ffprobe output ... }, "mediainfo": { ... mediainfo output ... } } Error Conditions: - Invalid API token. - Invalid or inaccessible file URL. - Unsupported media format. - Tool execution errors. Related Endpoints: - GET /v1/probe/batch: For analyzing multiple files concurrently. ``` -------------------------------- ### Get Current User Profile Response Source: https://docs.probe.dev/api-reference/user/get-current-user-profile Example JSON response structure for a successful request to retrieve the current user's profile. ```json { "additional-emails": [ "" ], "created": "2023-11-07T05:31:56Z", "email": "theUser@probe.dev", "first-name": "J", "id": 1, "last-name": "Doe", "parent": { "email": "theUser@probe.dev", "id": 1, "role": "root", "status": "anonymous", "username": "theUser" }, "permissions": {}, "plan": { "expires": "2023-11-07T05:31:56Z", "id": 1, "name": "" }, "role": "root", "status": "anonymous", "updated": "2023-11-07T05:31:56Z", "username": "theUser" } ``` -------------------------------- ### Get Current User Profile (cURL) Source: https://docs.probe.dev/api-reference/user/get-current-user-profile Example cURL command to fetch the current user's profile. Requires specifying the host. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/user/current ``` -------------------------------- ### Get Requests Statistics Example Source: https://docs.probe.dev/api-reference/statistics/requests-statistics Demonstrates how to retrieve request statistics using a cURL command and shows a sample JSON response for a successful request. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/statistics/requests \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Batch Processing: Local FFprobe to Probe.dev API Source: https://docs.probe.dev/guides/migration-guide Compares a local FFprobe batch processing script using shell to its equivalent using the Probe.dev API via curl. Demonstrates updating file paths to URLs and converting command parameters to API parameters. ```shell # Before: Local FFprobe processing for file in /media/*.mp4; do ffprobe -v quiet -print_format json -show_format "$file" > "$(basename "$file").json" done ``` ```shell # After: Probe.dev API processing # Assumes media_urls array and PROBE_API_TOKEN are set for url in "${media_urls[@]}"; do curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=ffprobe" \ --data-urlencode "url=$url" \ > "$(basename "$url").json" done ``` -------------------------------- ### Get Request Log Entry (cURL) Source: https://docs.probe.dev/api-reference/media/get-request-log-entry-by-id Example cURL command to fetch a specific request log entry by its ID. Requires an authorization token in the header. ```curl curl --request GET \ --url https://{host}/frontend/api/v1/media/log/{log-request-id} \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Python: Local ffprobe vs. Probe.dev API Source: https://docs.probe.dev/guides/migration-guide Compares Python code for analyzing media files using a local ffprobe subprocess versus making a request to the Probe.dev API. The API version uses the 'requests' library and requires an API token. ```python import subprocess import json def analyze_media_local(file_path): cmd = [ 'ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', file_path ] result = subprocess.run(cmd, capture_output=True, text=True) return json.loads(result.stdout) ``` ```python import requests import os def analyze_media_api(file_url): params = { 'token': os.getenv('PROBE_API_TOKEN'), 'url': file_url, 'only': 'ffprobe', 'ffprobe[output_format]': 'json', 'ffprobe[show_format]': 'true', 'ffprobe[show_streams]': 'true' } response = requests.get('https://api.probe.dev/v1/probe/file', params=params) return response.json() ``` -------------------------------- ### Get Media Request Log Entry by ID (cURL) Source: https://docs.probe.dev/api-reference/media/get-request-log-entry-by-id Example cURL command to retrieve a specific media request log entry using its unique identifier. Requires an authorization token. ```bash curl --request GET \ --url https://{host}/frontend/api/v1/media/log/{log-request-id} \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Probe.dev API: Tool Version Specification Source: https://docs.probe.dev/guides/migration-guide Demonstrates how to specify exact versions for tools like FFprobe and MediaInfo when using the Probe.dev API to ensure consistent migration results. This is achieved by passing version parameters in the API request. ```APIDOC Probe.dev API: FFprobe Versioning Parameters: - token: Your Probe.dev API token (e.g., ${PROBE_API_TOKEN}) - url: The URL of the media file to analyze - ffprobe[version]: Specify FFprobe version (e.g., "6.0", "latest") - ffprobe[enabled]: Set to "true" to enable FFprobe analysis Example: curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "url=https://example.com/video.mp4" \ --data-urlencode "ffprobe[version]=6.0" \ --data-urlencode "ffprobe[enabled]=true" ``` ```APIDOC Probe.dev API: MediaInfo Versioning Parameters: - token: Your Probe.dev API token (e.g., ${PROBE_API_TOKEN}) - url: The URL of the media file to analyze - mediainfo[version]: Specify MediaInfo version (e.g., "23.11", "latest") - mediainfo[enabled]: Set to "true" to enable MediaInfo analysis Example: curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "url=https://example.com/video.mp4" \ --data-urlencode "mediainfo[version]=23.11" \ --data-urlencode "mediainfo[enabled]=true" ``` ```APIDOC Probe.dev API: Supported Tool Versions FFprobe: Available Versions: latest, 7.0, 6.0, 5.1, 5.0, 4.4, 4.3, 4.2, 4.1, 4.0, 3.4, 3.3 Default: latest User Configurable: Yes MediaInfo: Available Versions: latest, 24.06, 23.11, 22.12, 21.09, 20.09, 19.09, 18.12 Default: latest User Configurable: Yes MediaStreamValidator: Version: 1.24.5 (686.23b-241118) Status: Fixed User Configurable: No ``` -------------------------------- ### Debug Probe.dev Media Stream Validation with CLI Output Source: https://docs.probe.dev/guides/hls-validation This example demonstrates how to use curl to send a POST request to the Probe.dev API for media stream validation. It includes enabling CLI output and setting parse_playlist_only to false for detailed debugging information. The output is piped to jq to extract the cli_output field. ```bash curl -X POST https://api.probe.dev/v1/probe/mediastreamvalidator \ -H "Authorization: Bearer $PROBE_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://problematic-stream.com/playlist.m3u8", "enable_cli_output": true, "parse_playlist_only": false }' | jq -r '.cli_output' ``` -------------------------------- ### Node.js: Local ffprobe vs. Probe.dev API Source: https://docs.probe.dev/guides/migration-guide Compares Node.js code for analyzing media files using local ffprobe execution via 'child_process.exec' versus making a request to the Probe.dev API using 'axios'. The API version requires an API token. ```javascript const { exec } = require('child_process'); function analyzeMediaLocal(filePath) { return new Promise((resolve, reject) => { exec(`ffprobe -v quiet -print_format json -show_format -show_streams "${filePath}"`, (error, stdout, stderr) => { if (error) reject(error); else resolve(JSON.parse(stdout)); }); }); } ``` ```javascript const axios = require('axios'); async function analyzeMediaApi(fileUrl) { const params = new URLSearchParams({ 'token': process.env.PROBE_API_TOKEN, 'url': fileUrl, 'only': 'ffprobe', 'ffprobe[output_format]': 'json', 'ffprobe[show_format]': 'true', 'ffprobe[show_streams]': 'true' }); const response = await axios.get(`https://api.probe.dev/v1/probe/file?${params}`); return response.data; } ``` -------------------------------- ### Delete Active Session Example Source: https://docs.probe.dev/api-reference/auth/delete-active-session Example of how to delete an active session using cURL. ```curl curl --request DELETE \ --url https://{host}/frontend/api/v1/auth/session/{session-id} \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Analyze RTMP Stream with Probe.dev API Source: https://docs.probe.dev/reference/sample-media-library This example demonstrates analyzing an RTMP stream using the Probe.dev API. It sends a request to the /v1/probe/file endpoint, specifying the RTMP URL and requesting 'ffprobe' output. ```shell curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=ffprobe" \ --data-urlencode "url=rtmp://matthewc.co.uk/vod/scooter" ``` -------------------------------- ### Update Sub User Profile Response Example Source: https://docs.probe.dev/api-reference/user/update-sub-user-profile-by-id Example JSON response for a successful sub-user profile update. ```json { "additional-emails": [ "" ], "created": "2023-11-07T05:31:56Z", "email": "theUser@probe.dev", "first-name": "J", "id": 1, "last-name": "Doe", "parent": { "email": "theUser@probe.dev", "id": 1, "role": "root", "status": "anonymous", "username": "theUser" }, "permissions": {}, "plan": { "expires": "2023-11-07T05:31:56Z", "id": 1, "name": "" }, "role": "root", "status": "anonymous", "updated": "2023-11-07T05:31:56Z", "username": "theUser" } ``` -------------------------------- ### Probe.dev API Authentication Header Source: https://docs.probe.dev/guides/mcp-integration Demonstrates the recommended authentication method using an Authorization header with a Bearer token for accessing the Probe.dev MCP server. ```json { "headers": { "Authorization": "Bearer your-api-token" } } ``` -------------------------------- ### Analyze File with FFprobe using Probe.dev API Source: https://docs.probe.dev/reference/sample-media-library This example demonstrates how to use the Probe.dev API to retrieve FFprobe analysis for a given media file URL. It requires an API token and the URL of the file to analyze. The 'only=ffprobe' parameter specifies the desired analysis type. ```bash curl -G https://api.probe.dev/v1/probe/file \ --data-urlencode "token=${PROBE_API_TOKEN}" \ --data-urlencode "only=ffprobe" \ --data-urlencode "url=https://probelibrary.s3.amazonaws.com/samples/V-codecs/h264/x264.avi" ``` -------------------------------- ### Update Sub User Profile Example Source: https://docs.probe.dev/api-reference/user/update-sub-user-profile-by-id Example of how to update a sub-user's profile using a PUT request with cURL. ```curl curl --request PUT \ --url https://{host}/frontend/api/v1/user/{user-id} \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ \ "first-name": "J", \ "last-name": "Doe" \ }' ``` -------------------------------- ### Update User Profile Example Source: https://docs.probe.dev/api-reference/user/update-user-profile Example of how to update the current user's profile using a PUT request with JSON payload. ```bash curl --request PUT \ --url https://{host}/frontend/api/v1/user/current \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ \ "first-name": "J", \ "last-name": "Doe" \ }' ``` -------------------------------- ### Claude Desktop Configuration Source: https://docs.probe.dev/guides/mcp-integration Configuration for Claude Desktop to connect to a Probe.dev MCP server. This JSON file specifies the URL and authorization headers for the server. ```json { "mcpServers": { "probe-dev": { "url": "https://mcp.probe.dev/", "headers": { "Authorization": "Bearer your-api-token-here" } } } } ``` -------------------------------- ### Get User by ID API Endpoint Source: https://docs.probe.dev/api-reference/user/get-user-by-id Details for the GET /frontend/api/v1/user/{user-id} endpoint, including parameters, response structure, and authorization. ```APIDOC GET /frontend/api/v1/user/{user-id} Description: Retrieves a user's profile information based on their unique ID. Authorization: - API Key (Header) - JWT Token (Header/Cookie) Parameters: - user-id (integer, required): The unique identifier for the user. Must be >= 1. Responses: - 200 OK (application/json): Description: Successful retrieval of user data. Content: { "additional-emails": [""], "created": "2023-11-07T05:31:56Z", "email": "theUser@probe.dev", "first-name": "J", "id": 1, "last-name": "Doe", "parent": { "email": "theUser@probe.dev", "id": 1, "role": "root", "status": "anonymous", "username": "theUser" }, "permissions": {}, "plan": { "expires": "2023-11-07T05:31:56Z", "id": 1, "name": "" }, "role": "root", "status": "anonymous", "updated": "2023-11-07T05:31:56Z", "username": "theUser" } - 401 Unauthorized: Description: Authentication failed or token is invalid. Related Endpoints: - Update user profile: /api-reference/user/update-user-profile - Update sub user profile by id: /api-reference/user/update-sub-user-profile-by-id ``` -------------------------------- ### JWT Token Generation Response Example Source: https://docs.probe.dev/api-reference/auth/generate-new-jwt-token Example of a successful response from the JWT generation API, containing the token's expiration and the token itself. ```json { "expire": "2024-11-01T16:39:02Z", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.zzzzzzzzzzzzzzzzzzz-zzzzzzzzzzzzzzzzzzzzzzz" } ``` -------------------------------- ### Continue VS Code Extension Configuration Source: https://docs.probe.dev/guides/mcp-integration Configuration for the Continue VS Code extension to connect to a Probe.dev MCP server. This JSON structure defines the server connection details. ```json { "mcpServers": [ { "name": "probe-dev", "url": "https://mcp.probe.dev/", "headers": { "Authorization": "Bearer your-api-token-here" } } ] } ``` -------------------------------- ### Web Streaming Format Recommendations Source: https://docs.probe.dev/reference/container-formats Recommended container formats for web streaming, detailing common codec pairings for universal compatibility and modern browser optimization. ```text MP4 (H.264 + AAC) - Universal compatibility WebM (VP9 + Opus) - Modern browsers, smaller files HLS (MPEG-TS) - Live streaming and adaptive delivery ```