Skip to main content

Official Python SDK for Parallax AI

Project description

Parallax AI — Python SDK

The official Python SDK for the Parallax AI platform. Covers REST endpoints across Iris, chats, characters, payments, and more, plus typed constants for every Iris workflow node.

Install

pip install parallax-sdk

Requires Python 3.9+. The import package is parallax_ai:

from parallax_ai import ParallaxAI

Quick start

from parallax_ai import ParallaxAI

async def main():
    async with ParallaxAI(api_key="pk_...") as client:
        me = await client.users.me()
        print(me)

import asyncio; asyncio.run(main())

A synchronous client is also exported as ParallaxAISync.

Iris workflow nodes

Node type identifiers, port shapes, and config-field metadata are auto-generated from packages/iris-nodes/dist/snapshot.json and exposed through parallax_ai.iris_nodes.

from parallax_ai.iris_nodes import NodeType, get_node_definition

# All node types as string constants:
NodeType.GEN_TEXT_TO_TEXT            # 'GEN_TEXT_TO_TEXT'
NodeType.UTIL_ROUTER                 # 'UTIL_ROUTER'
NodeType.WEB_SEARCH                  # 'WEB_SEARCH'

# Full definition, including ports and config fields:
defn = get_node_definition(NodeType.UTIL_REGEX)
print(defn.label, defn.category)        # "Regex" "UTILITY"
print([p.name for p in defn.outputs])   # ['matches', 'firstMatch', 'replaced']
print([f.name for f in defn.config_fields])

NodeDefinition carries can_be_tool (whether the node is allowed in GEN_TEXT_TO_TEXT.mode='agent' tool pickers) and each NodeConfigField carries depends_on — a UI visibility hint of the form {"field": "<other-name>", "value": <expected-value>} you can use for conditional SDK-side validation.

Phase 1 — newly added nodes

Type Category Purpose
WEB_SEARCH WEB Perplexity Sonar search with 60-min cache. canBeTool=True.
UTIL_ROUTER UTILITY N-way conditional routing; first matching condition wins.
UTIL_FILTER UTILITY Pass-through gate based on a JS expression.
UTIL_AGGREGATE UTILITY Collect loop iterations into array / object / concatenated text.
UTIL_TRY_CATCH UTILITY Retry upstream with exponential backoff; route failures to error.
UTIL_SUB_WORKFLOW UTILITY Invoke another saved workflow as one step.
UTIL_REGEX UTILITY match / extract / replace with regular expressions. canBeTool=True.
UTIL_DATE UTILITY parse / format / add / diff with timezone support. canBeTool=True.
UTIL_JSON_PATH UTILITY Extract values via dot-bracket or JSONPath. canBeTool=True.

GEN_TEXT_TO_TEXT also gained an agent mode that takes a tools array of node IDs (each must be canBeTool=True) and a maxIterations safety cap.

Phase 2 — RAG alternatives + structured AI + WEB scraping

Type Category Purpose
DOC_LONG_CONTEXT ANALYZER Document Q&A via Claude 1M / Gemini 2M with prompt cache (90%+ repeat-query cost reduction). RAG alternative. canBeTool=True.
DOC_GREP UTILITY Literal/regex search inside a file with context lines. Zero LLM calls. canBeTool=True.
AI_STRUCTURED_EXTRACT ANALYZER Pull a typed object out of unstructured input via JSON Schema (OpenAI / Anthropic / Gemini). canBeTool=True.
AI_CATEGORIZE ANALYZER Single- or multi-label classification against a predefined label set. canBeTool=True.
WEB_SCRAPER WEB URL → clean markdown via Firecrawl / Jina Reader / Readability. canBeTool=True.
WEB_YOUTUBE_TRANSCRIPT WEB YouTube URL → transcript with timestamps; falls back to Whisper when no official captions. canBeTool=True.

Phase 3 — entry points + media + integrations

Type Category Purpose
TRIGGER_CHAT TRIGGER Chat UI entry point with multi-turn history output and per-session sessionId.
TRIGGER_FORM TRIGGER Hosted form (dynamic field definitions) submits straight into the workflow.
TRIGGER_EMAIL_RECEIVED TRIGGER Start on inbound email (Gmail Pub/Sub push or IMAP polling) with subject/from filters.
EDIT_AUDIO_SEPARATE EDITOR Demucs/Spleeter stem separation: vocals, instrumental, drums, bass.
EDIT_VIDEO_MERGE EDITOR Concat up to 5 clips with fade/crossfade/cut transitions; LUFS audio normalization.
EDIT_VIDEO_OVERLAY EDITOR Composite text or image onto video (9-grid position, opacity/scale sliders, time range).
GEN_LIP_SYNC GENERATOR Re-sync mouth in a video to a different audio track (dubbing pipelines).
OUTPUT_SLACK_POST OUTPUT Block Kit / threaded messages to channels or users.
OUTPUT_SHEET_APPEND OUTPUT Append rows to Google Sheets with columnMapping + automatic header row.

See examples/ for one runnable script per new node.

Examples

git clone https://github.com/parallax-ai-llc/parallax-ai
cd parallax-ai/sdk-py
pip install -e .
python examples/agent_with_tools.py     # prints workflow JSON

Uncomment the client.iris.create_workflow(**wf) line in any example to actually POST it to the API.

Regenerating node constants

The maintainer flow when iris-nodes adds or changes a node:

pnpm --filter iris-nodes build           # writes dist/snapshot.json
cd sdk-py && python scripts/generate_iris_nodes.py
# → src/parallax_ai/iris_nodes.py is rewritten; commit the diff.

generate_iris_nodes.py is idempotent — running it without a snapshot change produces zero diff.

Links

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

parallax_sdk-0.4.0.tar.gz (78.2 kB view details)

Uploaded Source

Built Distribution

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

parallax_sdk-0.4.0-py3-none-any.whl (90.8 kB view details)

Uploaded Python 3

File details

Details for the file parallax_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: parallax_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 78.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for parallax_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 521a88eede796b44d47c9ca88e92ef3ca3a8b9b9d997de64e2d69a01bd22145e
MD5 ca709a035c7cbd3f03c92ccd4b1fdd0d
BLAKE2b-256 4246ce2f39078a557388379f6f4e226d9a065c769b959ce83d831e0faa865cfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for parallax_sdk-0.4.0.tar.gz:

Publisher: sdk-py-publish.yml on parallax-ai-llc/parallax-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parallax_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: parallax_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 90.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for parallax_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e184ff4b45e10df3c113a4689e59cff3f9b836a2857717b645d5964201f9428
MD5 d9fdedb3b43e7b968482fc18f2e30213
BLAKE2b-256 f725c779e5eaa58b3c403d0ecfaa225fc9a2b00555fc6b334598bb626e4fc38b

See more details on using hashes here.

Provenance

The following attestation bundles were made for parallax_sdk-0.4.0-py3-none-any.whl:

Publisher: sdk-py-publish.yml on parallax-ai-llc/parallax-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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