Storylinez LogoStorylinez

Documentation

Quickstart Guide: Detailed Walkthrough

πŸ› οΈ Prerequisites: What You Need First

Before you begin interacting with the Storylinez API, ensure you have the following essentials:

  • A Storylinez Account:
    Why: Your account is your gateway to the Storylinez platform. It's where you'll manage your profile, access billing information, and most importantly, generate the necessary API credentials (API Key and Secret) to authenticate your requests. You can sign up or log in via the Storylinez website or application.
  • Basic Knowledge of REST APIs:
    Why: The Storylinez API follows REST principles. Understanding fundamental concepts like HTTP methods (POST for creating, GET for retrieving, PUT/PATCH for updating, DELETE for removing), request headers (metadata sent with your request, like authentication), and JSON (the standard data format used for sending and receiving data) is crucial for interacting with the API effectively. Familiarity with these concepts will make it easier to understand how to structure your API calls and interpret the responses.
  • A Tool to Make API Requests:
    Why: You need a way to send requests to the Storylinez API endpoints and receive responses. Several tools can help:
    • Postman: A popular graphical application ideal for testing API calls without writing code. It allows you to easily configure requests, headers, and view responses.
    • cURL: A command-line tool available on most operating systems. It's powerful for scripting and quick tests directly from your terminal.
    • Programming Languages (e.g., Python with `requests` library): For integrating Storylinez functionality into your own applications, you'll write code using libraries that handle HTTP requests in your chosen language.

βœ… Step 1: Authentication

🎯 Goal: Securely identify yourself or your application to the Storylinez API, proving you have permission to perform actions.

🧾 What You Need:

  • API Key: Think of this as your unique username for the API. It identifies which application or user is making the request.
  • API Secret: This is like your password for the API. It's a confidential token used to verify the authenticity of the request associated with the API Key.
  • How to Obtain: Both the API Key and Secret are generated within your Storylinez account settings, typically in a dedicated API or Developer section.

πŸ” How to Authenticate:

  • Mechanism: For every single call you make to the Storylinez API, you must include specific information in the request headers. Headers are like metadata attached to your request.
  • Required Headers:
    • X-API-Key: Set the value to your specific API Key.
    • X-API-Secret: Set the value to your specific API Secret.
  • Security: Treat your API Key and especially your API Secret with the utmost care. Never expose them in client-side code, public repositories, or unsecured communications. Compromised credentials could allow unauthorized access to your account and resources.

🏒 Step 2: Obtain Your Organization ID

🎯 Goal: Identify the specific workspace (Organization) within Storylinez where you want to create your video projects.

Why: Organizations provide structure. Think of it as a dedicated workspace or folder for a specific client, department, or overall purpose. All API actions, like creating projects, happen within the context of a specific organization.

How: Organizations are created and managed through the Storylinez user interface (website or app). Once you have created an organization, you can find its unique organization_id within the application's settings or dashboard. You will need this ID for subsequent API calls, such as creating projects.

Locate and save the org_id from the Storylinez application for the next step.

🎬 Step 3: Create a Project

🎯 Goal: Initiate a new, specific video creation effort within a designated organization.

Why: A project represents a single video you intend to create. It acts as a container for all the elements related to that specific video: the initial prompt, the generated storyboard, uploaded media, voiceover choices, sequence arrangements, and the final rendered output.

How: You'll make an API call (likely a POST request) to the project creation endpoint, specifying the organization_id under which this project should reside. You might also provide an initial name or other metadata for the project.

πŸ“₯ Response: The API will respond with details about the newly created project, crucially including a unique project_id.

Importance of project_id: This ID is essential. You will use it in almost all subsequent API calls related to this specific video (e.g., adding prompts, generating storyboards, rendering). Keep track of it.

Make a POST request to the project creation endpoint. Save the project_id from the response.

πŸ“‚ Step 4: Retrieve Your Projects

🎯 Goal: Get a list of existing video projects associated with a specific organization.

Why: This is useful for several reasons:

  • To verify that the project you created in Step 3 exists.
  • To get the project_id of existing projects if you didn't save it previously.
  • To build interfaces or dashboards that display a user's or organization's projects.
  • To manage projects programmatically (e.g., finding a project to update or delete).

How: You'll make an API call (likely a GET request) to a project listing endpoint, usually requiring the organization_id as a parameter to specify which organization's projects you want to see.

πŸ“€ Response: The API will return a list, typically in JSON format, containing information about each project within that organization (e.g., project name, project_id, creation date).

Make a GET request to the projects endpoint with your organization ID.

πŸŽ₯ Step 5: Understanding the Video Building Pipeline

This is the core process where your ideas are transformed into a video using Storylinez's AI capabilities. The API allows you to control and interact with each stage of this pipeline. It's crucial to understand that these stages are generally sequential and depend on each other.

πŸ” Pipeline Overview: The typical flow involves interacting with these components sequentially. Each step builds upon the previous one:

Core Video Creation Flow

1. Project(Contains Files, Settings)
↓
2. Prompt(Text or Video Reference)
↓
3. Storyboard(AI-Generated Plan)
↓
4. Voiceover(Generated or Uploaded)
↓
5. Sequence(Timeline Editing)
↓
6. Render(Final Video Output)

Note: Files (media assets) are associated with the Project (Step 1) and used throughout the process, especially during Storyboard generation and Sequencing.

Let's break down each stage in the flow:

  1. 🎬 Project (and πŸ“ Files)
    What: The container for your entire video creation effort. It holds settings (like orientation), associated media files (your uploads or selected stock assets), and links all subsequent components together. Files are the raw visual/audio ingredients.
    How: Create a project using the API (Step 3), specifying the org_id. Upload or associate media files (images, video clips, audio) to this project via file management endpoints.
    Role: Establishes the workspace for a single video. Files provide the building blocks used by the AI and during manual sequencing.
  2. 🧠 Prompt
    What: This is your instruction to the Storylinez AI, written in natural language, describing the video you want to create.
    How: You provide the prompt text via an API call associated with your specific project_id.
    Role: The prompt is arguably the most critical input for the AI. It sets the topic, tone, style, target audience, key messages, and desired length. A clear, detailed prompt leads to a more relevant and coherent AI-generated storyboard. It's the primary driver for the initial creative direction.
  3. 🧱 Storyboard
    What: An AI-generated plan or blueprint for your video, created based on your prompt and the media files associated with the project. It follows a specific JSON structure (schema).
    How: After submitting a prompt (and ensuring files are associated with the project), trigger an API call to generate the storyboard for that project_id. The AI analyzes the prompt and available media to propose a structure.
    Role: Translates your text prompt and media context into a structured narrative outline, including suggested scenes, scripts, and visual/audio placements. You can often review and modify this via the API or UI. The structure adheres to the Storyboard Schema, detailed in the API reference.
  4. πŸŽ™οΈ Voiceover
    What: The narration or spoken audio track for your video.
    How: You have options, controllable via the API: Upload your own file or use Text-to-Speech (TTS) by providing text and letting the AI generate a synthetic voiceover.
    Role: Adds auditory explanation, narration, or dialogue, significantly impacting the video's engagement and clarity.
  5. 🎞️ Sequence
    What: The process of arranging and refining the order, timing, transitions, and precise media usage based on the storyboard and voiceover. This also follows a specific JSON structure (schema).
    How: Using API calls associated with your project_id, you manipulate the elements. This involves ordering scenes, setting durations, choosing transitions, synchronizing visuals with audio, and placing specific media onto the timeline. This step often starts with the structure proposed by the Storyboard and must conform to the Sequence Schema.
    Role: This stage transforms the static storyboard blueprint into a dynamic timeline, controlling the rhythm, pacing, and overall flow of the final video. The structure adheres to the Sequence Schema, detailed in the API reference.
  6. 🎬 Render
    What: The final step where Storylinez processes all inputs and compiles them into a single video file.
    How: You initiate rendering via an API call for your project_id. This is often asynchronous; the API might provide status checks.
    Role: This is the culmination. The output is the finished video (e.g., MP4) that you can download or share.

πŸš€ Next Steps & Where to Go from Here

Once you've mastered these fundamental steps, you can explore more advanced API functionalities:

  • Project Management: Look for API endpoints to modify project details (rename, add descriptions), duplicate existing projects as templates, or delete projects you no longer need. Explore the Projects API.
  • Best Practices Guide: Consult Storylinez documentation for tips on writing effective prompts, structuring videos for maximum impact, choosing the right AI voices, and leveraging specific features for better results. Understanding these nuances will help you get the most out of the AI. Check out the Best Practices guide.
  • Explore the Organizations API for more operations.

πŸ“Œ Final Thoughts

The Storylinez API offers a powerful way to automate and integrate AI-driven video creation into your workflows. By understanding each stepβ€”from authentication and project setup to navigating the detailed video building pipelineβ€”you can move beyond manual creation and leverage the API to produce videos programmatically, efficiently managing the entire production process from start to finish.