### Example Response for GET /me Endpoint (JavaScript) Source: https://github.com/viduhq/api-docs/blob/main/README.md This JSON object shows the typical response structure from the /me endpoint. It includes the user's ID, type, and email, as well as the workspace's ID, name, type, and identifier. ```javascript { "type": "me", "user": { "id": 1, "type": "user", "email": "gavin@vidu.io" }, "workspace": { "id": 2, "name": "Gavin's Workspace", "type": "workspace", "identifier": "uwgqrasxh" } } ``` -------------------------------- ### Example Response for Job Endpoints (JavaScript) Source: https://github.com/viduhq/api-docs/blob/main/README.md This JSON object represents the response received after creating or retrieving a job. It contains job details such as ID, status, inputs, outputs (if complete), view key, project information, and timestamps. ```javascript { "id": 7654321, "type": "job", "status": "queued", // "queued" | "processing" | "error" | "complete" "inputs": { "website_1_url": "www.linkedin.com/in/gavinjoyce", "website_2_url": "www.vidu.io" }, "outputs": null, "view_key": "bzMbzRxFUoSd", "project": { "id": 26896, "name": "REST API Sample Video Recording", "type": "project", "project_type": "video" }, "inserted_at": "2023-09-21T13:06:58.631391Z", "completed_at": null, } ``` -------------------------------- ### Retrieving User and Workspace Info via VIDU API (Bash) Source: https://github.com/viduhq/api-docs/blob/main/README.md This snippet demonstrates how to make a GET request to the /me endpoint using curl. It requires an Authorization header with a Bearer token. The endpoint returns details about the user and workspace associated with the provided API key. ```bash curl -X GET "https://www.vidu.io/api/v1/me" -H "Authorization: Bearer {token}" ``` -------------------------------- ### Example Request Body for POST /jobs (JavaScript) Source: https://github.com/viduhq/api-docs/blob/main/README.md This JSON object illustrates the required structure for the request body when creating a new job via the /jobs endpoint. It must include the project_id and an inputs object containing parameters specific to the project template. ```javascript { "project_id": 26896, "inputs": { "website_1_url": "www.linkedin.com/in/gavinjoyce", "website_2_url": "www.vidu.io" } } ``` -------------------------------- ### Enqueuing a New Job via VIDU API (Bash) Source: https://github.com/viduhq/api-docs/blob/main/README.md This curl command shows how to send a POST request to the /jobs endpoint to create a new personalized media job. It requires the Content-Type and Authorization headers, and a JSON body specifying the project_id and inputs. ```bash curl -X POST "https://www.vidu.io/api/v1/jobs" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer {token}" \ -d '{ "project_id": 26896, "inputs": { "website_1_url": "www.linkedin.com/in/gavinjoyce", "website_2_url": "www.vidu.io" } }' ``` -------------------------------- ### Retrieving a Specific Job via VIDU API (Bash) Source: https://github.com/viduhq/api-docs/blob/main/README.md This curl command demonstrates how to fetch the details of a specific job using its ID via the /jobs/[id] endpoint. It requires the job ID in the URL path and the standard Authorization header. ```bash curl -X GET "https://www.vidu.io/api/v1/jobs/7654321" -H "Authorization: Bearer {token}" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.