the CHEAPEST way to access SORA 2 by API

Local Buzz AI
6 Oct 202512:54

TLDRThis tutorial demonstrates how to access Sora 2 via its API when you don't have access to the app or website. By using the key.ai platform and N8N, users can set up a simple workflow to send prompts and images to the API, receive a task ID, and download the resulting video. The video walks through creating API requests, managing keys, and handling response tasks. A downloadable JSON file with the N8N workflow is provided, allowing users to easily replicate the process and start generating videos with Sora 2.

Takeaways

  • 😀 You can access Sora 2 via the API if you haven't received an invite code for the app or website.
  • 💻 Key.ai is used to interact with the Explore the capabilities of the Sora 2 API for advanced AI-powered solutions., just like it was used for VO3 and Nano Banana.
  • 💡 The cost for using the API is 20 credits (10 cents for a 10-second video).
  • 🎥 You can use Key.ai's playground for one-off videos by uploading a file and setting a prompt.
  • 🖼️ For API access, you can host your image online and use its URL to interact with the API.
  • 🔧 In N8N, create a trigger, set up the prompt, and connect an HTTP request to Key.ai's API.
  • 🔑 To use Key.ai's API, you need to create an API key through their API Key Management section.
  • ⏳ Use a wait step in N8N to handle the time it takes for the task to complete.
  • 🔄 Add an if statement in N8N to check whether the task is ready or still waiting, and loop until it's done.
  • 📥 Once the task is finished, extract the result URL and use an HTTP request to download the generated content.
  • 📁 You can import the JSON workflow from the video to N8N and reuse it with your own API key.

Q & A

  • What is the main topic of the video?

    -The video explains how to access Sora 2 via API using the platform key.ai, as an alternative for users who don't have direct access through the Sora website or app.

  • Why would someone want to use the API instead of the Sora app?

    -Because Sora 2 access is invite-only, and many users have not received an invite code yet. Using the API through key.ai allows them to use Sora 2 features without waiting for an official invite.

  • What is key.ai used for in this process?

    -Key.ai is used to connect with Sora 2’s API, allowing users to generate videos using text-to-video or image-to-video prompts through either its playground interface or API integration.

  • How much does it cost to use Sora 2 via key.ai?

    -It costs 20 credits, which equals about 10 cents for a 10-second video.

  • What is N8N, and how is it used in this tutorial?

    -N8N is an automation tool that allows users to create workflows connecting different APIs and services. In this tutorial, it’s used to automate the process of sending prompts and images to the key.ai API to generate Sora 2 videos.

  • What are the two input types mentioned for generating videos?

    -The two input types are 'text to video' and 'image to video'. Users can provide either a text prompt or an image to generate video content.

  • What does the creator do after setting up the prompt and image in N8N?

    -The creator sets up an HTTP request node to send the prompt and image to key.ai’s API, includes their API key, and then executes the request to receive a task ID in response.

  • Why is there a wait step in the workflow?

    -The wait step allows time for the Sora 2 Pro API to process the video generation task, which can take about a minute and a half. The creator uses short wait times while building the workflow for testing purposes.

  • How does the workflow check if the video generation is complete?

    -The workflow uses an 'if' statement to repeatedly check the task status returned by the API. It loops until the status changes from 'waiting' to 'success'.

  • What happens when the video generation isAccess Sora 2 API successful?

    -Once successful, the API returns an object containing the video URL. The workflow extracts this URL and then uses an HTTP GET request to download the completed video.

  • What does the creator provide at the end of the video for viewers?

    -The creator offers a downloadable JSON file of the N8N workflow, which viewers can import directly into N8N to replicate the setup.

  • What error did the creator encounter and how was it fixed?

    -The creator accidentally deleted the key 'image URLs' in the workflow, causing issues with the API request. They fixed it by re-adding the correct key name.

  • How does the creator demonstrate that the setup works?

    -They run the complete workflow using a sample prompt and image, retrieve the video URL, and confirm that the video generated successfully by viewing it.

  • What kind of example prompt was used in the demonstration?

    -The example prompt used in the demonstration was related to the Toronto Blue Jays defeating the New York Yankees.

  • What final advice does the creator give to viewers?

    -The creator thanks viewers for watching and reminds them that they can download and import the JSON workflow file from the link in the description to easily replicate the setup.

Outlines

00:00

🔧 Accessing Sora 2 via API Setup

This paragraph outlines the steps to access Sora 2 when you don't have an invite code. The method shown involves using the key.ai platform to send API requests to generate videos. The speaker explains how to use key.ai's playground to create videos from prompts and images and how to work with the API through N8N. This section includes instructions on setting up prompts and uploading images for video creation, focusing on the initial setup steps and configurations required for using the API.

05:12

⏳ Managing API Requests and Task ID

Here, the speaker discusses the process of managing API requests and handling task IDs. After setting up the prompt and image, they show how to send a request using key.ai's API and retrieve a task ID. The speaker encounters an issue with missing values in the setup, which they quickly correct, and then explain how to wait for the task to complete. The wait time is adjusted, and they show how to query the task status, indicating the importance of proper error handling and waiting for the task to be ready before continuing.

10:13

🎥 Finalizing the Video Creation and Download

This section demonstrates how to finalize the video creation process. Once the taskAccessing Sora 2 API completes, the video URL is extracted from the response, and the video is downloaded using another HTTP request. The speaker emphasizes how to handle the response to access the video URL, and ends with a demonstration of the final video result. There’s also a brief mention of an issue with the video prompt related to a baseball game, showing that the speaker was experimenting with different prompts. The final instructions encourage users to download the setup as a JSON file for reuse in N8N.

Mindmap

Keywords

💡SORA 2

SORA 2 is the specific AI model/service the video demonstrates how to access. It is the main subject of the tutorial — the speaker shows how to use SORA 2 both in the online playground and via the API when an invite code to the app or site isn’t available. In the script the narrator repeatedly references “Sora 2 in the API” and demonstrates making API calls to generate video output with SORA 2.

💡API

API (Application Programming Interface) is the programmatic way to talk to SORA 2 instead of using the website UI. The video’s whole focus is showing the cheapest method to get access by sending requests to the SORA 2 API from tools like N8N rather than waiting for an invite. Examples in the script include creating HTTP requests, sending prompts and image URLs, and polling the API for a task status.

💡key.ai / kie.ai

key.ai (also referred to as kie.ai in the transcript) is the platform used in the example that exposes SORA 2 in a playground and via API endpoints. The narrator shows using the playground for quick manual generation and then copies the same workflow to automate API requests from N8N. The script describes viewing SORA 2 onAccess SORA 2 API kie.ai/key.ai, seeing pricing details (20 credits for a 10-second video), and copying curl examples from its API docs.

💡N8N

N8N is the automation/workflow tool used to orchestrate the API calls to SORA 2 in the demonstration. The speaker builds a flow in N8N with manual triggers, set nodes, HTTP request nodes, wait steps, and conditional checks to poll for completion. In the script the narrator imports curl into an N8N HTTP request node, drags prompt and image values into the request body, and loops with wait steps until the task returns success.

💡playground

The playground refers to the web interface on the key.ai/kie.ai site where users can manually create text-to-video or image-to-video generations. The video contrasts using the playground (uploading files, entering prompts, and downloading finished videos) with automating the same process through the API. The transcript specifically says you can “use the playground right here, and then download them” if you only need a video or two.

💡API key

An API key is the secret token used to authenticate requests to the SORA 2 API. The narrator creates an API key in key.ai’s API key management, inserts it into N8N’s HTTP request nodes, and later deletes it for security after the demo. The script shows copying the API key into the request headers so the platform accepts the POST and GET calls to create and poll tasks.

💡curl

curl is the command-line example format the API documentation provides; the narrator copies the curl snippet to import into N8N. Importing the curl into N8N automatically sets the HTTP method, URL, headers, and body so the user can adapt it with dynamic prompt and image fields. The script repeatedly mentions copying the curl, importing it to the HTTP request node, and then replacing static values with expressions from earlier steps.

💡HTTP request

An HTTP request node sends the actual API calls to key.ai/SORA 2 — e.g., to create a task or to poll a task status. In the N8N workflow the HTTP request node is used for the initial POST to create a task (sending prompt and image URLs) and later for GET requests to check the task result. The transcript describes configuring the HTTP request node, adding the API key header, and then executing it to receive a task ID or a 'waiting' status.

💡task ID

A task ID is the identifier returned by the SORA 2 API when you create a generation job; it’s used to query the job’s status and retrieve the result. The narrator’s workflow captures this task ID from the create-task response and later includes it in the poll request to check whether the video is ready. The script explicitly mentions receiving a task ID and then using it in subsequent HTTP requests to query the job.

💡wait step

A wait step is a pause in the N8N workflow used to delay polling so the API has time to finish processing the task. The video shows using short waits (5 seconds for quick testing) and longer waits (e.g., 180 seconds) in production to avoid excessive polling. In the script the narrator adds a wait step between polls and explains looping the check until the task status equals 'success.'

💡prompt

A prompt is the text instruction given to SORA 2 describing what video to generate (e.g., actions, scenes, or voice lines). The tutorial demonstrates copying the exact prompt from the playground into the N8N workflow so the API generates the same content. The transcript refers several times to setting the prompt manually in a set node, and to using AI nodes or webhooks to dynamically generate prompts in other use-cases.

💡image URL

An image URL is a publicly hosted link to an image used as input for image-to-video generation. The narrator hosts an example image online, places its URL into the API request, and shows that SORA 2 can use that image together with the prompt to create the video. In the script the user drags the image URL into the HTTP request body, and later downloads the generated video that was produced using that image.

💡set node / object extraction

A set node in N8N is used to define or extract structured data (like prompt and image fields) for later steps, and object extraction is used to pull the result URL from nested JSON. The video shows creating a set node to hold prompt and image strings and later using a set node to convert the API response JSON into an object so the workflow can extract the generated video URL. The script shows the narrator switching a response to an object and then pulling out the URL to download the file.

💡download / HTTP GET

Downloading is the final step where the workflow retrieves the finished video file from the URL returned by the API, typically via an HTTP GET request. After the task returns 'success' and the URL is extracted, the narrator uses an HTTP request node with the GET method to fetch the video and then views or saves it. The transcript explicitly describes executing the GET request and viewing the finished video.

💡webhook / automation

A webhook is an alternative way to feed prompts or images into the workflow automatically instead of entering them manually; automation is the broader goal of the N8N setup. The narrator mentions that in real workflows you might use an AI node or a webhook to supply prompts dynamically, whereas the tutorial uses manual set nodes for clarity. The script contrasts manual prompt entry with more automated approaches the viewer may prefer when scaling usage.

Highlights

Learn how to access Sora 2 via API when not yet invited to the app or website.

Using key.ai for Sora 2 API, with a cost of 20 credits for a 10-second video.

Quick video and image-to-video creation using key.ai's playground feature.

How to upload a file and generate a video with a prompt and image hosted online.

Setting up N8N for automated API requests to key.ai for Sora 2 video generation.

Steps for manually setting the prompt and image URL in N8N before sending the API request.

Copying and importing the cURL command to make API requests in N8N for task creation.

Explanation of how to retrieve and use the API key for authentication in the request.

Managing errors when the request fails, and troubleshooting with N8N workflow.

Incorporating wait steps in N8N to handle delays while waiting for task completion.

Querying the task status using the task ID to check if the video is ready for download.

Setting up an 'if' condition in N8N to continuously check the task status until success.

Utilizing a set node toJSON code correction extract the video URL from the response JSON for further use.

Using an HTTP request in N8N to download the video after task completion.

Final steps to verify the generated video, including checking the video result in N8N.