Skip to main content

Storylinez: A modular library for narrative generation and story manipulation

Project description

Storylinez SDK

PyPI version Python Versions License: MIT

Storylinez SDK - AI-driven content creation platform

Build production-grade AI video workflows in Python.

Storylinez SDK gives you one client that covers:

  • Project and media management
  • Prompting and generation pipelines
  • Storyboard and sequence control
  • Rendering, sharing, and automation jobs
  • V2 schema-aware workflow modules

Quick Navigation

Install

Install from PyPI:

pip install storylinez

Install from source:

git clone https://github.com/Storylinez-Official/Storylinez_SDK.git
cd Storylinez_SDK
pip install -e .

Authenticate

Create a .env file:

STORYLINEZ_API_KEY=api_your_key_here
STORYLINEZ_API_SECRET=your_secret_here
STORYLINEZ_ORG_ID=your_org_id_here
STORYLINEZ_BASE_URL=https://api.storylinezads.com

Initialize client:

import os
from dotenv import load_dotenv
from storylinez import StorylinezClient

load_dotenv()

client = StorylinezClient(
    api_key=os.getenv("STORYLINEZ_API_KEY"),
    api_secret=os.getenv("STORYLINEZ_API_SECRET"),
    org_id=os.getenv("STORYLINEZ_ORG_ID"),
    base_url=os.getenv("STORYLINEZ_BASE_URL", "https://api.storylinezads.com"),
)

5-Minute Quickstart

from storylinez import StorylinezClient
import os
from dotenv import load_dotenv

load_dotenv()

client = StorylinezClient(
    api_key=os.getenv("STORYLINEZ_API_KEY"),
    api_secret=os.getenv("STORYLINEZ_API_SECRET"),
    org_id=os.getenv("STORYLINEZ_ORG_ID"),
)

# 1) Create project
project = client.project.create_project(
    name="SDK Quickstart",
    orientation="landscape",
    purpose="Generate a short launch video"
)
project_id = project["project"]["project_id"]

# 2) Create prompt
client.prompt.create_text_prompt(
    project_id=project_id,
    main_prompt="Create a 30-second launch teaser for a productivity app",
    document_context="Audience: founders and operators",
    total_length=30,
)

# 3) Generate storyboard
storyboard = client.storyboard.create_storyboard_and_wait(
    project_id=project_id,
    deepthink=True,
    timeout=300,
)

# 4) Build sequence
client.sequence.create_sequence(
    project_id=project_id,
    apply_template=True,
    apply_grade=True,
)

# 5) Render final output
render = client.render.create_and_wait_for_render(
    project_id=project_id,
    timeout=1800,
    target_width=1920,
    target_height=1080,
    subtitle_enabled=True,
)

print("Render status:", render.get("status"))

Module Map

All modules are available through StorylinezClient.

Core generation

Module What it handles
project Project and folder lifecycle
prompt Text/video prompt creation and updates
storyboard Story generation and scene edits
voiceover AI/custom voiceover management
sequence Sequence timeline generation and refinement
render Final render creation and render history

Media and discovery

Module What it handles
storage Upload, process, analyze, and manage files
stock Stock media search and retrieval
search Semantic and metadata search across media

Organization and style

Module What it handles
company_details Company profile data
brand Brand presets, logos, and styling
settings User defaults and settings
user User info, storage, and usage data

Utility and advanced workflows

Module What it handles
tools AI tools (briefs, plans, trend analysis, scraper)
utils Format metadata, utility jobs, prompt helpers
v2_project V2 project media operations
v2_context V2 docs and references
v2_effects V2 effect catalog
v2_schema V2 sequence/asset schemas
v2_sequence V2 interactive sequence sessions
v2_render V2 render lifecycle
v2_share V2 share links
pipeline_jobs Start and track V1/V2 one-shot pipelines
data_collection YouTube collection and extraction jobs
voice_library Voice catalog and TTS jobs

Additional helper class:

  • PipelineClient in src/storylinez/pipeline.py for combined web scraping + brand extraction helper flow.

Detailed Documentation

New detailed docs are now available in documentation/:

Examples

Working scripts are in examples/:

  • project_examples.py
  • storage_examples.py
  • prompt_examples.py
  • storyboard_examples.py
  • sequence_examples.py
  • render_examples.py
  • tools_examples.py
  • v2_project_examples.py

Guides

Tutorial-style docs are in guides/, including:

  • API key setup and usage
  • End-to-end platform workflows
  • Organization/team management
  • Prompting and editing guidance
  • Publishing and support workflows

Platform Links

Requirements

  • Python 3.6+
  • Dependencies from package metadata (setup.py)

Support

License

MIT License. See LICENSE.rst.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

storylinez-1.0.0.tar.gz (136.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storylinez-1.0.0-py3-none-any.whl (151.6 kB view details)

Uploaded Python 3

File details

Details for the file storylinez-1.0.0.tar.gz.

File metadata

  • Download URL: storylinez-1.0.0.tar.gz
  • Upload date:
  • Size: 136.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for storylinez-1.0.0.tar.gz
Algorithm Hash digest
SHA256 39450aff79d0464e568dc3285214b8c43a7a0660ed1d7420b48608d78c343358
MD5 da290fdca6a96532c7ea0017a3feed68
BLAKE2b-256 3c9ffdc7971598ddc5da7057ec6066dc556d259e70843da0ece8de915a6940f0

See more details on using hashes here.

File details

Details for the file storylinez-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: storylinez-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 151.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for storylinez-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dce2dbe29c5b200628f7faed347ada732a67a0283564dadefcc4e4275639f31
MD5 68f1c6005001ae9c00e570686aa36c46
BLAKE2b-256 2084abae54911f1c0f4a1cc60c038860c76cd7fdc9572d63d0708d1dd9111511

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page