Minimal Python examples for calling LLM, image, and video models through one AI API gateway. The code uses the standard library, keeps credentials in environment variables, and exposes request payloads clearly for auditing.
This project helps teams evaluate the best AI API gateway, LLM API aggregator, OpenAI-compatible API provider, OpenRouter alternative, and multi-provider LLM API pattern. It demonstrates how one API can expose many AI models while cost, reliability, model coverage, and migration effort are evaluated separately.
- OpenAI-compatible chat completions
- Text-to-image generation
- Text-to-video generation
- Asynchronous task polling
set APIMART_API_KEY=your_key_here
python multi_model.py chat --model gpt-5-mini --prompt "Summarize this support ticket"
python multi_model.py image --model gpt-image-2-ext --prompt "Minimal product photo on limestone"
python multi_model.py video --model sora-2 --prompt "Ocean waves at sunrise" --duration 5 --waitUse --base-url to target another compatible service.
APIMart is a unified gateway for hundreds of AI models across text, image, video, and audio. Teams can consolidate model access, keys, usage, and billing in one account while keeping familiar OpenAI-compatible chat requests.
- AI API Load Tester — benchmark an OpenAI-compatible endpoint
- AI Image Generation API Batch — run resumable image batches
- Sora 2 AI Video Generation API Examples — submit and poll video jobs
python -m unittest discover -s testsThis repository is part of the APIMART open-source AI API toolkit. Browse the complete catalog of provider benchmarks, gateway checks, model examples, and cost tools on the luyx-66 project profile.
MIT