Skip to main content

OpenAI AI Actions SDK

openai-ai-actions-sdk is a Python SDK for common AI tasks across documents, images, and audio.

It provides simple actions like summarization, keyword extraction, image understanding, question answering, transcription, and transcript summarization, while hiding the lower-level OpenAI API request handling from application code.

What The SDK Can Do

  • Document actions: generate text, summarize, extract keywords, analyze sentiment, answer questions from context
  • Image actions: describe images, analyze images, answer questions about an image
  • Audio actions: transcribe audio and summarize transcripts

Package Structure

The main SDK entry point is AIActions.

from mysdk import AIActions

sdk = AIActions()

After creating the SDK, the advanced modules are available as:

  • sdk.documents
  • sdk.images
  • sdk.audio

The package also keeps backward-compatible shortcuts like:

  • sdk.generate_text(...)
  • sdk.summarize(...)
  • sdk.extract_keywords(...)
  • sdk.analyze_sentiment(...)
  • sdk.answer_question(...)

Install

Install the package normally:

pip install openai-ai-actions-sdk

If you are working from the source repo locally:

pip install .

For development with tests:

pip install -e .[dev]

Environment Setup

Set your OpenAI API key before running live SDK calls.

PowerShell:

$env:OPENAI_API_KEY="your_api_key"

Command Prompt:

set OPENAI_API_KEY=your_api_key

Quick Start

from mysdk import AIActions

sdk = AIActions()

print(sdk.documents.summarize_short("Long document text"))
print(sdk.documents.extract_keywords_detailed("Python SDKs simplify AI integration."))
print(sdk.documents.answer_question(
    context="Paris is the capital of France.",
    question="What is the capital of France?",
))
print(sdk.images.describe("sample.png"))
print(sdk.audio.transcribe("meeting.wav"))

Main Modules

Documents

Use sdk.documents for text and document-style operations.

Examples:

sdk.documents.summarize("Long text")
sdk.documents.summarize_short("Long text")
sdk.documents.extract_keywords_detailed("Some content")
sdk.documents.analyze_sentiment_detailed("The SDK is practical and clear.")
sdk.documents.answer_question(
    context="The company is based in Austin.",
    question="Where is the company based?",
)

Images

Use sdk.images for image understanding.

Examples:

sdk.images.describe("photo.jpg")
sdk.images.analyze("chart.png")
sdk.images.answer_question("screenshot.png", "What does this image show?")

Audio

Use sdk.audio for audio transcription and transcript summarization.

Examples:

sdk.audio.transcribe("meeting.wav")
sdk.audio.transcribe_detailed("meeting.wav")
sdk.audio.summarize("meeting.wav")

Test The Installed Package

After installing the package on any machine, you can test document, image, and audio support with this script.

Replace the image and audio paths with real files on that machine.

from mysdk import AIActions, AIActionError

DOCUMENT_TEXT = """
OpenAI provides APIs that help developers build AI-powered applications.
Python SDKs make integration cleaner, faster, and easier to maintain.
"""

IMAGE_PATH = r"C:\path\to\your\image.jpg"
AUDIO_PATH = r"C:\path\to\your\audio.mp4"

try:
    sdk = AIActions()

    print("DOCUMENT RESULT:")
    print(sdk.documents.summarize_short(DOCUMENT_TEXT))

    print("\nIMAGE RESULT:")
    print(sdk.images.analyze(IMAGE_PATH))

    print("\nAUDIO RESULT:")
    print(sdk.audio.summarize(AUDIO_PATH))

except AIActionError as exc:
    print(f"SDK error: {exc}")

Run it with:

PowerShell:

$env:OPENAI_API_KEY="your_api_key"
python test_sdk.py

Command Prompt:

set OPENAI_API_KEY=your_api_key
python test_sdk.py

Verify The Installed Version

To confirm that the installed package includes the advanced API:

python -c "from mysdk import AIActions; sdk=AIActions(); print(hasattr(sdk, 'documents'), hasattr(sdk, 'images'), hasattr(sdk, 'audio'))"

Expected output:

True True True

Run Unit Tests

The test suite uses mocked OpenAI behavior, so it does not require a live API key.

pytest

Notes

  • Internally, the SDK uses the official OpenAI Python library.
  • The package is modular, but the top-level compatibility methods are still available for simpler usage.
  • Image and audio actions require real local file paths.
  • Current document methods operate on text content, not document file paths like PDF or DOCX.

Metadata

Release files for openai-ai-actions-sdk 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openai-ai-actions-sdk 0.3.2
File Size Uploaded
openai_ai_actions_sdk-0.3.2.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openai-ai-actions-sdk 0.3.2
File Interpreter ABI Platform
openai_ai_actions_sdk-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / openai_ai_actions_sdk-0.3.2.tar.gz

Download URL openai_ai_actions_sdk-0.3.2.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
25baea077199c92e326e3ac222def68e9fa218aedf6c3697736091e0f331d8dd
BLAKE2b-256 checksum
How to use checksums
d63b2d02b92196702adf598134765daa07ab10c9a470c27af59f52294b787b5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / openai_ai_actions_sdk-0.3.2-py3-none-any.whl

Download URL openai_ai_actions_sdk-0.3.2-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faaf51285c35fbee86aefb6781f3f9bfef63b7b7450bd3733c4b692805f68f1e
BLAKE2b-256 checksum
How to use checksums
9135df1a5e8e5ee64bb6cbe946e73bae8fa977c5b0bf003e63d895e9dd7c8fd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page