Call OmniaKey from your terminal, scripts and CI with structured JSON results.
01
Install your tool
Install the tagged GitHub source globally. The package exposes the omniakey command and includes its MCP server.
npm install --global github:omniakey-com/omniakey-devtools#v0.1.0
omniakey help02
Connect your API key
Paste your key at the hidden terminal prompt and press Enter. Start your agent from this environment; never put the key in a prompt or repository.
Get an API keyread -s OMNIAKEY_API_KEY
export OMNIAKEY_API_KEY$env:OMNIAKEY_API_KEY = [System.Net.NetworkCredential]::new('', (Read-Host 'OmniaKey API key' -AsSecureString)).Password03
Verify without generating
List accessible model IDs and read the common media envelope. Model-specific parameters and prices remain in the model documentation.
omniakey models --limit 10
omniakey schema mediaFind your model
Query models available to your API key, then check their documented capabilities and current prices.
Make one request
Use the same OmniaKey API for text and asynchronous image, video or audio tasks.
Pick up where you left off
Keep the task id and continue checking it. A local timeout never starts a second generation.
One task, from input to output
With the CLI installed, save the example as image.json and review the model and price before this paid request. Replace TASK_ID with the returned id.
omniakey submit --file image.json --idempotency-key YOUR_UNIQUE_TASK_KEY
omniakey task wait TASK_ID --timeout 300
omniakey task get TASK_ID04
Command reference
Install the tagged package globally, then run omniakey help. Every result is JSON on stdout; MCP mode reserves stdout for JSON-RPC.
| Command | Purpose | Billing |
|---|---|---|
omniakey models [--search TEXT] [--limit 50] | List models available to your API key. | Read-only |
omniakey schema chat|media | Print the common chat or media request envelope without a network request. | Read-only |
omniakey chat --model MODEL --prompt TEXT | Run one chat completion from a prompt or a JSON file. | Paid generation |
omniakey submit --file request.json --idempotency-key KEY | Submit a media task and return its id. | Paid generation |
omniakey run --file request.json --idempotency-key KEY [--timeout 90] | Submit a media task, then wait for it. | Paid generation |
omniakey task get ID | Read one task by id, including fresh asset URLs. | Read-only |
omniakey task wait ID [--timeout 90] [--interval 3] | Poll a task until it finishes or the local timeout expires. | Read-only |
omniakey task cancel ID | Request cancellation of a task; query its status to confirm. | Cancellation request |
05
Exit codes
Scripts can branch on these codes. A wait timeout still leaves the task running.
| Exit code | Meaning |
|---|---|
| 0 | Success; the command returned a result. |
| 1 | Request, input or usage error. |
| 2 | The task failed or was canceled. |
| 3 | The local wait timed out; the task still exists. |
06
Retries and recovery
The CLI does not retry requests automatically. Recovery is explicit so a network error cannot create a duplicate generation.
Reuse one idempotency key
Use the same key for the same intended generation. Reusing a key with a different request returns a conflict; do not replace the key just because a response was lost.
Keep the task id
submit and run return a task id. task get, task wait and task cancel take that id. A local timeout does not cancel or resubmit the task.
Watch run's timeout
run waits up to 90 seconds by default. If it exits with code 3, the task still exists: call task wait or task get with the same id.
Refresh expired links
Successful asset URLs expire. Query the same task again for fresh URLs instead of starting another generation.
07
Security and limits
The CLI keeps credentials out of files and applies fixed limits before and after each request.
Key from the environment only. The CLI reads OMNIAKEY_API_KEY and never writes it to disk. Do not pass it as a command-line argument, which shells may record.
HTTPS by default. OMNIAKEY_BASE_URL defaults to "https://api.omniakey.com/v1". Plain HTTP is accepted only for a loopback address during local testing.
No redirects. The client refuses redirects, so a key cannot be forwarded to another host.
Fixed size limits. Request JSON is limited to 1 MiB and API responses to 8 MiB; oversized payloads are rejected.
Bounded network time. Each API call times out after 120 seconds. Generation can outlive that call, so recover through the task id.
08
About this tool
Pinned release v0.1.0
OmniaKey developer tools are open source and published as a tagged GitHub package. This page documents the command surface and behavior of that release.
- License
- MIT
- Architecture
- CLI or MCP client → shared client → api.omniakey.com/v1
- Tests
- The repository's integration tests run the CLI against a local HTTP server and the MCP server through a real stdio client. They do not run paid generations.
- Key handling
- The website never receives your API key. The CLI and MCP server read it from your environment and send it only to the API endpoint.
Common questions
Does this change model pricing?
No. The tools use your existing API key and the gateway's billing rules. Model discovery and local schema checks do not submit generation; chat and media generation can incur charges.
What happens when waiting times out?
The remote task is not canceled or resubmitted. Keep its id and continue with task get or task wait. Successful asset URLs expire; query the same task for fresh links.
Does the CLI store my API key?
No. It reads OMNIAKEY_API_KEY from the environment for each run and does not write the key to disk.
Can I run it in CI?
Yes. Set OMNIAKEY_API_KEY as a secret environment variable and call the CLI non-interactively. Keep one idempotency key per intended generation.
Does it download generated images or video?
No. It returns JSON with metadata and signed asset URLs. Download the files with your own tooling before those URLs expire.