# Account Credits balance Source: https://docs.tensorpix.ai/api-reference/accounts/account-credits-balance https://backend.tensorpix.ai/api/schema/ get /api/accounts/profile/balance/ Returns the 🪙 Credits balance of the current account. # List available AI Filters (ML models) Source: https://docs.tensorpix.ai/api-reference/ml-models/list-available-ai-filters-ml-models https://backend.tensorpix.ai/api/schema/ get /api/ml-models/ The terms "AI Filters" and "ML Models" refer to the same concept. - "AI Filter" is a more user-friendly term often used in user interfaces. - "ML Model" is commonly found in technical documentation such as API references. Each ML model belongs to one task. E.g. `200% AI Upscale` would belong to a `Super Resolution` task group. When selecting models for a video, one can only select one ML model per task group. Visit the the [Help Center](https://help.tensorpix.ai/en/collections/5832762-ai-filters) for more detailed information about each ML model and its capabilities. # Delete a real estate image asset Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/delete-a-real-estate-image-asset https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/projects/{project_id}/assets/images/{asset_id}/ Delete one image asset from one owned real estate project. # Delete a real estate project logo Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/delete-a-real-estate-project-logo https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/projects/{project_id}/logo/ Remove and delete the current logo image asset from one owned project. # Delete a real estate video asset Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/delete-a-real-estate-video-asset https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/projects/{project_id}/assets/videos/{asset_id}/ Delete one video asset from one owned real estate project. # Get a real estate image asset Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/get-a-real-estate-image-asset https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/assets/images/{asset_id}/ Return one image asset from one owned real estate project. # Get a real estate video asset Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/get-a-real-estate-video-asset https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/assets/videos/{asset_id}/ Return one video asset from one owned real estate project. # List real estate image assets Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/list-real-estate-image-assets https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/assets/images/ Return image assets in one owned real estate project. # List real estate video assets Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/list-real-estate-video-assets https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/assets/videos/ Return video assets in one owned real estate project. # Upload a real estate project logo Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/upload-a-real-estate-project-logo https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/logo/ Upload a logo image and select the new image asset for one owned project. # Upload real estate background music Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/upload-real-estate-background-music https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/background-music/ Upload one audio file and select it as music for one owned project. # Upload real estate image assets Source: https://docs.tensorpix.ai/api-reference/real-estate-assets/upload-real-estate-image-assets https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/assets/images/ Import image files or image URLs into one owned real estate project. Return the created image assets. # Apply a real estate agent Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/apply-a-real-estate-agent https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/apply-agent/ Copy one owned reusable agent into an owned project's outro settings. # Apply a real estate brand kit Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/apply-a-real-estate-brand-kit https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/apply-brand-kit/ Copy one owned reusable brand kit into an owned project's templates. # Create a real estate agent Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/create-a-real-estate-agent https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/agents/ Create one reusable real estate agent for the current user. # Create a real estate brand kit Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/create-a-real-estate-brand-kit https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/brand-kits/ Create one reusable real estate brand kit for the current user. # Delete a real estate agent Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/delete-a-real-estate-agent https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/agents/{agent_id}/ Soft-delete one reusable real estate agent owned by the current user. # Delete a real estate brand kit Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/delete-a-real-estate-brand-kit https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/brand-kits/{brand_kit_id}/ Soft-delete one reusable real estate brand kit owned by the current user. # Get a real estate agent Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/get-a-real-estate-agent https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/agents/{agent_id}/ Return one reusable real estate agent owned by the current user. # Get a real estate brand kit Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/get-a-real-estate-brand-kit https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/brand-kits/{brand_kit_id}/ Return one reusable real estate brand kit owned by the current user. # List real estate agents Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/list-real-estate-agents https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/agents/ Return the reusable real estate agents owned by the current user. # List real estate brand kits Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/list-real-estate-brand-kits https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/brand-kits/ Return the reusable real estate brand kits owned by the current user. # Replace a real estate agent Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/replace-a-real-estate-agent https://backend.tensorpix.ai/api/schema/ put /api/v2/real-estate/agents/{agent_id}/ Replace the editable fields of one owned reusable real estate agent. # Replace a real estate brand kit Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/replace-a-real-estate-brand-kit https://backend.tensorpix.ai/api/schema/ put /api/v2/real-estate/brand-kits/{brand_kit_id}/ Replace the editable fields of one owned reusable real estate brand kit. # Update a real estate agent Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/update-a-real-estate-agent https://backend.tensorpix.ai/api/schema/ patch /api/v2/real-estate/agents/{agent_id}/ Update selected fields of one owned reusable real estate agent. # Update a real estate brand kit Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/update-a-real-estate-brand-kit https://backend.tensorpix.ai/api/schema/ patch /api/v2/real-estate/brand-kits/{brand_kit_id}/ Update selected fields of one owned reusable real estate brand kit. # Upload a real estate agent profile photo Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/upload-a-real-estate-agent-profile-photo https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/agents/{agent_id}/profile-photo/ Upload and attach a profile photo to one owned reusable agent. # Upload a real estate brand-kit logo Source: https://docs.tensorpix.ai/api-reference/real-estate-branding/upload-a-real-estate-brand-kit-logo https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/brand-kits/{brand_kit_id}/logo/ Upload and attach a logo to one owned reusable brand kit. # Cancel a real estate image edit job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/cancel-a-real-estate-image-edit-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/image-edit-jobs/{job_id}/cancel/ Cancel one image edit job when the current job state allows cancel. # Cancel a real estate render job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/cancel-a-real-estate-render-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/render-jobs/{job_id}/cancel/ Cancel one direct render job when the current job state allows cancel. # Cancel a real estate shot video job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/cancel-a-real-estate-shot-video-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/video-jobs/{job_id}/cancel/ Cancel one shot video job when the current job state allows cancel. # Create a property import job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/create-a-property-import-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/property-import-jobs/ Create and queue one job that imports property data from a supported URL. # Create a real estate image edit job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/create-a-real-estate-image-edit-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/image-edit-jobs/ Create and queue one image edit job for one owned real estate shot. # Create a real estate render job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/create-a-real-estate-render-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/render-jobs/ Create and queue one direct render job for one owned real estate project. # Create a real estate shot video job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/create-a-real-estate-shot-video-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/video-jobs/ Create and queue one video job from the current image for one shot. # Create a real estate video job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/create-a-real-estate-video-job https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/video-jobs/ Create and queue one job that makes the full video for one project. # Get a property import job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/get-a-property-import-job https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/property-import-jobs/{job_id}/ Return one property import job for one owned real estate project. # Get a real estate image edit job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/get-a-real-estate-image-edit-job https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/image-edit-jobs/{job_id}/ Return one image edit job for one owned real estate shot. # Get a real estate render job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/get-a-real-estate-render-job https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/render-jobs/{job_id}/ Return one direct render job for one owned real estate project. # Get a real estate shot video job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/get-a-real-estate-shot-video-job https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/video-jobs/{job_id}/ Return one video job for one owned real estate shot. # Get a real estate video job Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/get-a-real-estate-video-job https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/video-jobs/{job_id}/ Return one full video job for one owned real estate project. # List property import jobs Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/list-property-import-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/property-import-jobs/ Return property import jobs for one owned real estate project. # List real estate image edit jobs Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/list-real-estate-image-edit-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/image-edit-jobs/ Return image edit jobs for one shot in one owned real estate project. # List real estate render jobs Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/list-real-estate-render-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/render-jobs/ Return direct render jobs for one owned real estate project. # List real estate shot video jobs Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/list-real-estate-shot-video-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/video-jobs/ Return video jobs for one shot in one owned real estate project. # List real estate video jobs Source: https://docs.tensorpix.ai/api-reference/real-estate-jobs/list-real-estate-video-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/video-jobs/ Return full video jobs for one owned real estate project. # Create a real estate project Source: https://docs.tensorpix.ai/api-reference/real-estate-projects/create-a-real-estate-project https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/ Create one real estate project for the current account. # Delete a real estate project Source: https://docs.tensorpix.ai/api-reference/real-estate-projects/delete-a-real-estate-project https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/projects/{project_id}/ Hide one owned project now and queue its data cleanup. # Get a real estate project Source: https://docs.tensorpix.ai/api-reference/real-estate-projects/get-a-real-estate-project https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/ Return one real estate project owned by the current account. # List real estate projects Source: https://docs.tensorpix.ai/api-reference/real-estate-projects/list-real-estate-projects https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/ Return real estate projects owned by the current account. # Update a real estate project Source: https://docs.tensorpix.ai/api-reference/real-estate-projects/update-a-real-estate-project https://backend.tensorpix.ai/api/schema/ patch /api/v2/real-estate/projects/{project_id}/ Update selected data for one real estate project owned by the current account. # Create a real estate shot Source: https://docs.tensorpix.ai/api-reference/real-estate-shots/create-a-real-estate-shot https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/shots/ Create one empty shot in one owned real estate project. # Create a real estate shot batch Source: https://docs.tensorpix.ai/api-reference/real-estate-shots/create-a-real-estate-shot-batch https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/shot-batches/ Create ordered shots from selected image assets in one owned project. # Delete a real estate shot Source: https://docs.tensorpix.ai/api-reference/real-estate-shots/delete-a-real-estate-shot https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/ Delete one shot from one owned real estate project. # Get a real estate shot Source: https://docs.tensorpix.ai/api-reference/real-estate-shots/get-a-real-estate-shot https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/ Return one shot from one owned real estate project. # List real estate shots Source: https://docs.tensorpix.ai/api-reference/real-estate-shots/list-real-estate-shots https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/shots/ Return the ordered shots for one owned real estate project. # Update a real estate shot Source: https://docs.tensorpix.ai/api-reference/real-estate-shots/update-a-real-estate-shot https://backend.tensorpix.ai/api/schema/ patch /api/v2/real-estate/projects/{project_id}/shots/{shot_id}/ Update selected data for one shot in one owned real estate project. # Delete a real estate template image Source: https://docs.tensorpix.ai/api-reference/real-estate-templates/delete-a-real-estate-template-image https://backend.tensorpix.ai/api/schema/ delete /api/v2/real-estate/projects/{project_id}/template-images/{kind}/{field_name}/ Remove the image assigned to one template field in an owned project. # List real estate templates Source: https://docs.tensorpix.ai/api-reference/real-estate-templates/list-real-estate-templates https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/templates/ Return each available intro and outro template with its input fields. # Preview a real estate template Source: https://docs.tensorpix.ai/api-reference/real-estate-templates/preview-a-real-estate-template https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/template-preview/ Build an unsaved template preview for one owned real estate project. # Upload a real estate template image Source: https://docs.tensorpix.ai/api-reference/real-estate-templates/upload-a-real-estate-template-image https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/template-images/ Upload and assign an image to one template field in an owned project. # Generate real estate voiceover audio Source: https://docs.tensorpix.ai/api-reference/real-estate-voiceover/generate-real-estate-voiceover-audio https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/voiceover/generate-audio/ Create voiceover audio from the saved text for one project that has voiceover enabled. # Generate real estate voiceover text Source: https://docs.tensorpix.ai/api-reference/real-estate-voiceover/generate-real-estate-voiceover-text https://backend.tensorpix.ai/api/schema/ post /api/v2/real-estate/projects/{project_id}/voiceover/generate-text/ Generate and save voiceover text for one project that has voiceover enabled. # Get real estate voiceover limits Source: https://docs.tensorpix.ai/api-reference/real-estate-voiceover/get-real-estate-voiceover-limits https://backend.tensorpix.ai/api/schema/ get /api/v2/real-estate/projects/{project_id}/voiceover/character-limits/ Return the minimum, target, and maximum text size for project voiceover. # Update real estate voiceover text Source: https://docs.tensorpix.ai/api-reference/real-estate-voiceover/update-real-estate-voiceover-text https://backend.tensorpix.ai/api/schema/ patch /api/v2/real-estate/projects/{project_id}/voiceover/ Update the saved project voiceover text for one owned real estate project. # Delete enhanced video Source: https://docs.tensorpix.ai/api-reference/restored-videos/delete-enhanced-video https://backend.tensorpix.ai/api/schema/ delete /api/restored-videos/{id}/ # Get enhanced video details Source: https://docs.tensorpix.ai/api-reference/restored-videos/get-enhanced-video-details https://backend.tensorpix.ai/api/schema/ get /api/restored-videos/{id}/ # List enhanced videos Source: https://docs.tensorpix.ai/api-reference/restored-videos/list-enhanced-videos https://backend.tensorpix.ai/api/schema/ get /api/restored-videos/ # Create a sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/create-a-sharing-link https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/assets/audio/{id}/sharing/links/ Create one active sharing link for one owned asset. # Create a sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/create-a-sharing-link-1 https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/assets/images/{id}/sharing/links/ Create one active sharing link for one owned asset. # Create a sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/create-a-sharing-link-2 https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/assets/videos/{id}/sharing/links/ Create one active sharing link for one owned asset. # Delete a sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/delete-a-sharing-link https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/assets/audio/{id}/sharing/links/{shareable_resource_link_id}/ Delete one sharing link for one owned asset if the link exists. # Delete a sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/delete-a-sharing-link-1 https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/assets/images/{id}/sharing/links/{shareable_resource_link_id}/ Delete one sharing link for one owned asset if the link exists. # Delete a sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/delete-a-sharing-link-2 https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/assets/videos/{id}/sharing/links/{shareable_resource_link_id}/ Delete one sharing link for one owned asset if the link exists. # Delete a video asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/delete-a-video-asset https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/assets/videos/{id}/ Delete one video asset that the current account owns. # Delete a video asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/delete-a-video-asset-1 https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/projects/{project_pk}/assets/videos/{id}/ Delete one video asset that the current account owns. # Extract the last video frame Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/extract-the-last-video-frame https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/projects/{project_pk}/assets/videos/{id}/extract-last-frame/ Save the last frame of one video asset as a new image asset. # Get a shared asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-a-shared-asset https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/shared/audio/{raw_token}/ Return one shared asset when the token is valid and active. # Get a shared asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-a-shared-asset-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/shared/images/{raw_token}/ Return one shared asset when the token is valid and active. # Get a shared asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-a-shared-asset-2 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/shared/videos/{raw_token}/ Return one shared asset when the token is valid and active. # Get a video asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-a-video-asset https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/videos/{id}/ Return one video asset that the current account can access. # Get a video asset Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-a-video-asset-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/assets/videos/{id}/ Return one video asset that the current account can access. # Get sharing state Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-sharing-state https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/audio/{id}/sharing/ Return the active sharing state and link for one owned asset. # Get sharing state Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-sharing-state-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/images/{id}/sharing/ Return the active sharing state and link for one owned asset. # Get sharing state Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-sharing-state-2 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/videos/{id}/sharing/ Return the active sharing state and link for one owned asset. # Get the active sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-the-active-sharing-link https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/audio/{id}/sharing/links/ Return the active sharing link for one owned asset or return null. # Get the active sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-the-active-sharing-link-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/images/{id}/sharing/links/ Return the active sharing link for one owned asset or return null. # Get the active sharing link Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/get-the-active-sharing-link-2 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/videos/{id}/sharing/links/ Return the active sharing link for one owned asset or return null. # List video assets Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/list-video-assets https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/assets/videos/ Return video assets that the current account can use in this scope. # List video assets Source: https://docs.tensorpix.ai/api-reference/tensorshots-assets/list-video-assets-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/assets/videos/ Return video assets that the current account can use in this scope. # Cancel a text to image job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-a-text-to-image-job https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/jobs/text-to-image/{job_pk}/ Cancel one text to image job when the current job state allows cancel. # Cancel a text to image job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-a-text-to-image-job-1 https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/projects/{project_pk}/jobs/text-to-image/{job_pk}/ Cancel one text to image job when the current job state allows cancel. # Cancel an image description job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-an-image-description-job https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/jobs/image-to-text/{job_pk}/ Cancel one image description job when the current job state allows cancel. # Cancel an image edit job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-an-image-edit-job https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/jobs/image-to-image/{job_pk}/ Cancel one image edit job when the current job state allows cancel. # Cancel an image edit job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-an-image-edit-job-1 https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-image/{job_pk}/ Cancel one image edit job when the current job state allows cancel. # Cancel an image to video job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-an-image-to-video-job https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/jobs/image-to-video/{job_pk}/ Cancel one image to video job when the current job state allows cancel. # Cancel an image to video job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/cancel-an-image-to-video-job-1 https://backend.tensorpix.ai/api/schema/ delete /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-video/{job_pk}/ Cancel one image to video job when the current job state allows cancel. # Create a text to image job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-a-text-to-image-job https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/jobs/text-to-image/ Create and queue one image job that uses a text prompt. # Create a text to image job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-a-text-to-image-job-1 https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/projects/{project_pk}/jobs/text-to-image/ Create and queue one image job that uses a text prompt. # Create an image description job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-an-image-description-job https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/jobs/image-to-text/ Create and queue one job that makes text from an image. # Create an image edit job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-an-image-edit-job https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/jobs/image-to-image/ Create and queue one image edit job for the current account. # Create an image edit job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-an-image-edit-job-1 https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-image/ Create and queue one image edit job for the current account. # Create an image to video job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-an-image-to-video-job https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/jobs/image-to-video/ Create and queue one video job that uses one or more image frames. # Create an image to video job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/create-an-image-to-video-job-1 https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-video/ Create and queue one video job that uses one or more image frames. # Estimate a job cost Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/estimate-a-job-cost https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/jobs/cost/ Validate a model and its settings, then return the job cost in Credits. # Get a text to image job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-a-text-to-image-job https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/text-to-image/{job_pk}/ Return one text to image job owned by the current account. # Get a text to image job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-a-text-to-image-job-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/jobs/text-to-image/{job_pk}/ Return one text to image job owned by the current account. # Get an image description job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-an-image-description-job https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/image-to-text/{job_pk}/ Return one image description job owned by the current account. # Get an image edit job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-an-image-edit-job https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/image-to-image/{job_pk}/ Return one image edit job owned by the current account. # Get an image edit job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-an-image-edit-job-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-image/{job_pk}/ Return one image edit job owned by the current account. # Get an image to video job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-an-image-to-video-job https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/image-to-video/{job_pk}/ Return one image to video job owned by the current account. # Get an image to video job Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/get-an-image-to-video-job-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-video/{job_pk}/ Return one image to video job owned by the current account. # Improve a prompt Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/improve-a-prompt https://backend.tensorpix.ai/api/schema/ post /api/v2/tensorshots/jobs/prompt-enhancer/ Return an improved prompt for the given job type and source prompt. # List image description jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-image-description-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/image-to-text/ Return current image description jobs for the current account. # List image edit jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-image-edit-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/image-to-image/ Return current image edit jobs for the current account and optional project. # List image edit jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-image-edit-jobs-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-image/ Return current image edit jobs for the current account and optional project. # List image to video jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-image-to-video-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/image-to-video/ Return current image to video jobs for the current account and optional project. # List image to video jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-image-to-video-jobs-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/jobs/image-to-video/ Return current image to video jobs for the current account and optional project. # List text to image jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-text-to-image-jobs https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/jobs/text-to-image/ Return current text to image jobs for the current account and optional project. # List text to image jobs Source: https://docs.tensorpix.ai/api-reference/tensorshots-jobs/list-text-to-image-jobs-1 https://backend.tensorpix.ai/api/schema/ get /api/v2/tensorshots/projects/{project_pk}/jobs/text-to-image/ Return current text to image jobs for the current account and optional project. # Delete uploaded video Source: https://docs.tensorpix.ai/api-reference/videos/delete-uploaded-video https://backend.tensorpix.ai/api/schema/ delete /api/videos/{id}/ Deletes the uploaded video. > **⚠️ IMPORTANT:** If the video is currently being used in an active job, the endpoint will return a 409 Conflict status code. > > To delete the video in this case, you have two options: > 1. Wait for the job to complete and then delete the video. > 2. Stop the job that's currently using the video and then delete the video. # Get uploaded video Source: https://docs.tensorpix.ai/api-reference/videos/get-uploaded-video https://backend.tensorpix.ai/api/schema/ get /api/videos/{id}/ # List manually uploaded videos Source: https://docs.tensorpix.ai/api-reference/videos/list-manually-uploaded-videos https://backend.tensorpix.ai/api/schema/ get /api/videos/ List all manually uploaded videos. Videos that were implicitly uploaded using the `/jobs/from-url/` endpoint are not included in this list. # Manually upload videos Source: https://docs.tensorpix.ai/api-reference/videos/manually-upload-videos https://backend.tensorpix.ai/api/schema/ post /api/videos/ Upload a video from your local device. If the upload is successful, a 201 Created status code is returned along with the video's ID and metadata. > **⚠️ IMPORTANT:** The video is not yet ready for enhancement when this endpoint returns 201 Created. This is because the video is still being uploaded to the cloud storage. After uploading the video, follow these steps to ensure the video is fully uploaded and ready for enhancement: > > Poll for video's status: > - Use the [`get uploaded video`](https://backend.tensorpix.ai/api/schema/redoc/#tag/videos/operation/videos_retrieve) endpoint to check the status of the video. > - Poll this endpoint periodically to check the `file` field in the response. > > Checking the `file` Field: > - If the file field is `null`, the video is still being prepared. > - Once the file field contains a URL, the video is ready for further processing and enhancement. # Video AI Filters Source: https://docs.tensorpix.ai/essentials/ai-filters Learn how to use AI filters in TensorPix to enhance your videos ## What are AI Filters? Each AI filter is a specialized Machine Learning (ML) model designed to enhance videos in a specific way. TensorPix provides a variety of AI filters that can be applied to your videos to achieve different effects, such as uspcaling, deblurring, denoising... ## Listing filters To see which filters are available, you can call the `/api/ml-models/` endpoint. This will return a list of all available AI filters along with their details. ## Applying filters You can apply 1 or more filters to each video. Maximum number of filters that can be applied to a single video limited by your [subscription plan](https://app.tensorpix.ai/billing). Specified order of filters is irrelevant. The system chooses the optimal order when you submit the job. Some filters have an input video resolution limit. If you exceed the limit, the request will fail with status code `400` and an appropriate message. Resolution limit is displayed when listing filters using the `/api/ml-models/` endpoint. # Authentication Source: https://docs.tensorpix.ai/essentials/authentication How to authenticate with the TensorPix API ## Generating the API Key To generate an API key, perform the following: 1. [Sign up or log in to your TensorPix account](https://app.tensorpix.ai). 2. Click on your email in the top right corner to open the dropdown menu. 3. Click on the "Settings" menu. 4. On the [Settings page](https://app.tensorpix.ai/profile), navigate to the "For Developers" section. Settings page 5. In the "For Developers" section, you can generate new API keys and revoke existing ones. API access is not available in all subscription plans. See [pricing](https://tensorpix.ai/pricing) for more details. Only one API key can be active at a time. You can revoke an existing key and generate a new one at any time you like. The API key does not expire. ## Request Authentication To authenticate your API calls, add the following Authentication header to your requests: `Authorization: Token ` # Credits Source: https://docs.tensorpix.ai/essentials/credits All about Credits and how they work in TensorPix ## Basics Credits are a unit of measurement used to track your usage of the TensorPix API. Each time you enhance a video or image, it consumes a certain number of Credits. You can check the account Credit balance on the [Billing page](https://app.tensorpix.ai/billing), or using the `/api/accounts/profile/balance/` endpoint. ## How to top up Credits? Each subscription plan comes with a certain number of Credits included that renews evey month. If you run out of Credits, you can top up your balance by purchasing additional Credits on the [Billing page](https://app.tensorpix.ai/billing). ### What happens when I run out of Credits? Your requests will fail with the code `400` and an appropriate message if you do not have enough Credits to process the request. We currently do not support automatic top-ups, so you will need to manually purchase additional Credits (or upgrade subscription plan) when you run out. # Parallel Video Processing Source: https://docs.tensorpix.ai/essentials/parallel-processing Learn how parallel video processing works in TensorPix Parallel processing allows you to enhance multiple videos at once, significantly speeding up the processing time. This is especially useful when you have a large number of videos to process. ## How does it work? When you send a video enhancement request, your video job is sent to a queue service. The queue service checks how many active jobs your subscription plan allows. If the number of active jobs is below the limit, the job is processed as soon as there is an available GPU server. If the limit is reached, the job is queued and processed when a slot becomes available. You can queue as many jobs as you like, but only a limited number of them will be processed at the same time. The number of active jobs allowed is determined by your [subscription plan](https://app.tensorpix.ai/billing). ### Processing order Jobs are processed in the order they are received. It's not advised to cancel and re-submit jobs as this will further delay the queue and processing time. ## GPU servers We use specialized GPU servers to process videos. We strive to provide enough of the GPU servers so users don't have to wait for their jobs to be processed. However, during peak times, there might be a delay in processing your jobs if the number of active jobs exceeds the available GPU servers. Feel free to [contact us](mailto:devs@tensorpix.ai) if you experience long queue times. We are always happy to help and can provide custom solutions for your needs. # Storage Source: https://docs.tensorpix.ai/essentials/storage Learn how media storage works in TensorPix When you upload video and images to TensorPix, they are stored in a secure and scalable storage system. After the media file has finished processing, we also upload the processed media to the same storage system. ## Account Storage Quota Your account has a storage quota that limits the total size of media files you can store in TensorPix. The storage quota is determned by your subscription plan. You can check your current storage usage and quota in the [Billing page](https://app.tensorpix.ai/billing). ## Exceeding Storage Quota If you exceed your storage quota, you will not be able to upload new media files until you free up some space or upgrade your subscription plan. Each enhancing request will also fail with the code `400` and an appropirate message if you do not have enough storage space to store the processed media. We strongly advise that you copy the enhanced video or image to your S3 or other storage service. After copying, you should delete the enhanced media object from your TensorPix account. This limits the risk of ruuning out of storage space. ## Enhancing videos from URL If you enhance videos using the `/api/jobs/from-url`/ endpoint, the uploaded video size will not count towards your storage quota. The enhanced video will still count towards your storage quota, so make sure you have enough space to store the processed media. # Introduction Source: https://docs.tensorpix.ai/index Welcome to the home of TensorPIx API documentation ## Learning Essentials We recommend starting with the essentials to get a good understanding of how TensorPix works. Learn how to authenticate with the TensorPix API What are Credits and how to use them How does media storage work in TensorPix? How to enhance multiple videos at once ## API Reference If you want to dive deeper into the API, you can check out the [API Reference](/api-reference) for detailed information on all available endpoints, request parameters, and response formats. Detailed documentation of all API endpoints, request parameters, and response formats ## Code Recipes Recipes are a great way to get started with TensorPix. They provide ready-to-use code snippets that you can copy and paste into your projects. Code recipes for enhancing video quality using TensorPix Code recipes for using the Video Maker API # Real Estate Video Generation Source: https://docs.tensorpix.ai/recipes/real-estate-recipes Make sure all external URLs are publicly accessible. E.g. pre-sign private S3 assets. ## Terms ### Project A project stores the data and settings for one property video. ### Image Asset An image asset is one image stored in a project. ### Shot A shot is one scene in the final video. ### Job A job is work that runs after the API sends a response. ## Request Rules Use `https://backend.tensorpix.ai/api/v2/real-estate` as the base URL. Send `Authorization: Token API_TOKEN` in every request. Use `application/json` for JSON data. Use `multipart/form-data` for image files. The API only returns data owned by the account for the API token. ## Main Flow 1. Create a project for the property video. 2. Import property images from public image URLs or a supported property listing. 3. Attach the imported image assets to shots. The image order sets the shot order. 4. Update project data and video settings, including the output orientation. 5. Update each shot's duration and camera movement. 6. Confirm that the project is ready for generation. 7. Start video generation and wait for the job to finish. 8. Get the final rendered video URL. ## Limits And Errors Image asset IDs must belong to the same project. The account plan sets the project limit and shot limit. The account must have enough storage for image files. The account must have enough Credits before video work starts. ```python theme={null} """Generate a real-estate video with public image URLs or a Zillow listing.""" import os import time import requests API_TOKEN = os.environ["TENSORPIX_API_TOKEN"] API_URL = "https://backend.tensorpix.ai/api/v2/real-estate" SOURCE = "image_urls" IMAGE_URLS = [ "https://cdn.tensorpix.ai/real-estate-demo/outside.webp", "https://cdn.tensorpix.ai/real-estate-demo/living-room.webp", "https://cdn.tensorpix.ai/real-estate-demo/kitchen.webp", "https://cdn.tensorpix.ai/real-estate-demo/bedroom.webp", "https://cdn.tensorpix.ai/real-estate-demo/bathroom.webp", ] ZILLOW_URL = "https://www.zillow.com/homedetails/512-Winton-St-Philadelphia-PA-19148/10386909_zpid/" TERMINAL_JOB_STATUSES = {"completed", "failed", "cancelled", "expired"} def wait_for_job(job_url: str, headers: dict[str, str]) -> dict: """Poll a job until it completes or fails.""" deadline = time.monotonic() + 30 * 60 while time.monotonic() < deadline: response = requests.get(job_url, headers=headers, timeout=60) response.raise_for_status() job = response.json() print(f"Job {job['id']}: {job['status']}") if job["status"] == "completed": return job if job["status"] in TERMINAL_JOB_STATUSES: message = job.get("error_message") or f"Job ended as {job['status']}" raise RuntimeError(message) time.sleep(5) raise TimeoutError("Job did not finish within 30 minutes.") def create_project(headers: dict[str, str]) -> str: """Create a real-estate project and return its ID.""" response = requests.post( f"{API_URL}/projects/", headers=headers, json={"name": "Simple API real-estate video"}, timeout=60, ) response.raise_for_status() return response.json()["id"] def import_image_urls(project_id: str, headers: dict[str, str]) -> list[str]: """Import public image URLs and return their asset IDs.""" if not IMAGE_URLS: raise ValueError("Add at least one URL to IMAGE_URLS.") response = requests.post( f"{API_URL}/projects/{project_id}/assets/images/", headers=headers, json={"image_urls": IMAGE_URLS}, timeout=60, ) response.raise_for_status() return [image["id"] for image in response.json()] def import_zillow_images(project_id: str, headers: dict[str, str]) -> list[str]: """Import Zillow images and return their IDs.""" response = requests.post( f"{API_URL}/projects/{project_id}/property-import-jobs/", headers=headers, json={"url": ZILLOW_URL}, timeout=60, ) response.raise_for_status() job = response.json() print(job) job_url = f"{API_URL}/projects/{project_id}/property-import-jobs/{job['id']}/" wait_for_job(job_url, headers) response = requests.get( f"{API_URL}/projects/{project_id}/assets/images/", headers=headers, params={"page_size": 60, "ordering": "created_at"}, timeout=60, ) response.raise_for_status() payload = response.json() images = payload["results"] if isinstance(payload, dict) else payload return [image["id"] for image in images] def create_shots( project_id: str, image_ids: list[str], headers: dict[str, str], ) -> list[str]: """Create one shot for each image ID and return the shot IDs.""" if not image_ids: raise RuntimeError("The project has no images.") response = requests.post( f"{API_URL}/projects/{project_id}/shot-batches/", headers=headers, json={"image_asset_ids": image_ids}, timeout=60, ) response.raise_for_status() return [shot["id"] for shot in response.json()] def update_project_settings(project_id: str, headers: dict[str, str]) -> None: """Set project-level video settings.""" response = requests.patch( f"{API_URL}/projects/{project_id}/", headers=headers, json={"video_format": "16:9"}, timeout=60, ) response.raise_for_status() def update_shot_settings( project_id: str, shot_ids: list[str], headers: dict[str, str], ) -> None: """Set the duration and camera movement for each shot.""" for shot_id in shot_ids: response = requests.patch( f"{API_URL}/projects/{project_id}/shots/{shot_id}/", headers=headers, json={"requested_duration_s": 4.0, "camera_movement": "dolly_in"}, timeout=60, ) response.raise_for_status() def ensure_project_is_ready(project_id: str, headers: dict[str, str]) -> None: """Check that the project can start video generation.""" response = requests.get( f"{API_URL}/projects/{project_id}/", headers=headers, timeout=60, ) response.raise_for_status() if not response.json()["ready_for_generation"]: raise RuntimeError("The project is not ready for video generation.") def generate_video(project_id: str, headers: dict[str, str]) -> tuple[str, str]: """Generate the project video and return its asset ID and URL.""" response = requests.post( f"{API_URL}/projects/{project_id}/video-jobs/", headers=headers, json={}, timeout=60, ) response.raise_for_status() job = response.json() job_url = f"{API_URL}/projects/{project_id}/video-jobs/{job['id']}/" wait_for_job(job_url, headers) response = requests.get( f"{API_URL}/projects/{project_id}/assets/videos/", headers=headers, params={"tags": "render_full", "ordering": "-created_at", "page_size": 1}, timeout=60, ) response.raise_for_status() payload = response.json() videos = payload["results"] if isinstance(payload, dict) else payload if not videos: raise RuntimeError("The completed job has no rendered video.") video_url = videos[0].get("file") or videos[0].get("external_url") if not video_url: raise RuntimeError("The rendered video has no URL.") return videos[0]["id"], video_url def delete_video( project_id: str, video_id: str, headers: dict[str, str], ) -> None: """Delete one video asset from the project.""" response = requests.delete( f"{API_URL}/projects/{project_id}/assets/videos/{video_id}/", headers=headers, timeout=60, ) response.raise_for_status() def delete_project(project_id: str, headers: dict[str, str]) -> None: """Hide the project and queue its cleanup.""" response = requests.delete( f"{API_URL}/projects/{project_id}/", headers=headers, timeout=60, ) response.raise_for_status() def main() -> None: """Create a project, add images, and generate its final video.""" headers = {"Authorization": f"Token {API_TOKEN}"} project_id = create_project(headers) if SOURCE == "image_urls": image_ids = import_image_urls(project_id, headers) elif SOURCE == "zillow": image_ids = import_zillow_images(project_id, headers) else: raise ValueError("SOURCE must be 'image_urls' or 'zillow'.") shot_ids = create_shots(project_id, image_ids, headers) update_project_settings(project_id, headers) update_shot_settings(project_id, shot_ids, headers) ensure_project_is_ready(project_id, headers) video_id, video_url = generate_video(project_id, headers) print(video_url) # save water, save storage # delete_video(project_id, video_id, headers) # delete_project(project_id, headers) if __name__ == "__main__": main() ``` # Video Enhancing Recipes Source: https://docs.tensorpix.ai/recipes/video-enhancing Quickly get started by copying one of the video enhancing recipes. ## Enhancing video from URL Make sure the URL is publicly accessible and points to a video file. Example: `https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4` ### Python ```py theme={null} import requests import time API_KEY = "YOUR API KEY" BASE_URL = "https://backend.tensorpix.ai/api" STATUS_CHECK_INTERVAL = 10 HEADERS = {"Authorization": f"Token {API_KEY}"} def start_video_enhancement(video_url: str, ml_models: list[int]) -> dict: data = { "codec": "libx264", "crf": 23, "container": "mp4", "chroma_subsampling": "yuv420p", "video_url": video_url, "ml_models": ml_models, "output_resolution": -1, "grain": 0, "stabilization_smoothing": 0, } response = requests.post(url=f"{BASE_URL}/jobs/from-url/", headers=HEADERS, data=data) response.raise_for_status() return response.json() def wait_for_job_finish(job_id: int) -> dict: while True: time.sleep(STATUS_CHECK_INTERVAL) job_data = requests.get(url=f"{BASE_URL}/jobs/{job_id}/", headers=HEADERS).json() status = job_data["status"] if status == 0: print("Job is in queue") elif status == 1: print(f"Progress {(job_data['processing_progress'] * 100):.2f}%") elif status == 2: return job_data else: raise Exception("Job has failed") def remove_video(video_id): requests.delete(url=f"{BASE_URL}/restored-videos/{video_id}/", headers=HEADERS) job_info = start_video_enhancement( video_url="https://cdn.tensorpix.ai/videos/landing_hero_v2.mp4", ml_models=[34] # List all models with `/api/ml-models/` endpoint ) print(job_info) completed_job_data = wait_for_job_finish(job_info["id"]) # Getting enhanced video information enhanced_video_url = completed_job_data["output_video"]["file"] print(f"Enhanced video available at: {enhanced_video_url}") # Cleaning up -- removing the enhanced video from TensorPix servers # remove_video(completed_job_data["output_video"]["id"]) ```