Added Nov 9, 2026
lanshu-openai-media-api
A command-line tool and agent skill that calls OpenAI to generate text and images, transcribe recordings, and log usage.
- Ecosystem
- Agent Skills
- Skill category
- Media
- Creator / organization
- 岚叔(cclank)
What it is
lanshu-openai-media-api
lanshu-openai-media-api is published by 岚叔 (cclank). It is a small Python command-line tool that can also be packaged as a portable agent skill. It calls OpenAI's text, image, transcription, and cost APIs. After each call, the request ID, the returned usage, and the output file paths are saved together in one metadata file, so you can check them later. What sets it apart: usage records and output paths live in the same file. It needs Python 3.9 or newer, and the author says it uses only the standard library at runtime.
Highlights:
- Generates text, generates images, or transcribes a recording
- Saves the request ID, usage, and output paths together in a metadata file
- Includes a cost lookup; cost results are daily aggregates, not receipts for single requests
- The source script needs no installation, and it can be packaged as a skill for an agent's skill folder
How to use:
- First, run the script from the repository folder with `python3 scripts/openai_media.py`, or install the command with `python -m pip install .`
- Then set up your OpenAI key; generation and transcription use `OPENAI_API_KEY`
- Finally, to use it as a skill, run `python3 tools/build_skill.py --output-dir dist` and put the package in your agent's skill folder
Who it's for:
Developers who want an agent or script to call OpenAI for text, images, and transcription while keeping usage records.
Before you start:
- You need your own OpenAI key, and cost lookups also need an admin key (OPENAI_ADMIN_KEY or OPENAI_ADMIN_API_KEY)
- If no key is configured, the tool may read exported keys from ~/.zshrc through a new zsh process; `--no-shell-env` turns this off
- It goes online and sends your prompts, images, or recordings to OpenAI; with `--dry-run` it reads no credentials and does not go online
- Live calls incur OpenAI charges; the page does not state a price for the tool itself
- The license is MIT; content belongs to the original author
- If you use these features, weigh the safety risks yourself. AI Inspiration World is not responsible for any consequences.
Based on the project's public documentation. Not tested by AI Inspiration World.