python - How to get token or code embedding using Codex API? - Stack Overflow
Introducing Codex Python SDK
Can you use Codex via API?
How can I get the most out of Codex in VS Code for Full Stack Development?
Videos
OpenAI built a TypeScript SDK for Codex and used it for their app server and MCP. Great ecosystem if you're in TypeScript. There was basically zero incentive for anyone to build a Python equivalent because of that.
But Codex has a non-interactive execution mode that doesn't need any of that. So I wrapped it into a proper Python SDK with typed models, session continuity, and retry logic:
pip install codex-local-sdk-python
GitHub: https://github.com/maestromaximo/codex-local-sdk-python
PyPI: https://pypi.org/project/codex-local-sdk-python/
To test it I built a pipeline that takes a blog post and produces an explanatory video in one step using Codex + ElevenLabs + Remotion. Single instruction, fully deterministic, repeatable. Quality isn't perfect but that's what multi-pass pipelines are for.
If you're Python-native and want to automate Codex — this is for you. Open source, contributions welcome, would love to see this in the official OpenAI ecosystem eventually.
» pip install codex-sdk
Say I want to pay by usage instead of having to pay the Plus $20/mo subscription. Is there a way to use Codex or CLI like that or must you have a Plus subscription?