REST API for programmatic access to OKTA Studio
All authenticated endpoints require a Bearer token in the Authorization header. API keys start with onyx_sk_ and can be generated from your account settings.
curl https://okta.studio/api/v1/credits \
-H "Authorization: Bearer onyx_sk_your_api_key_here"Keep your API key secret. Do not expose it in client-side code, public repositories or logs. Rotate keys immediately if compromised.
https://okta.studio/api/v1Download the OKTA CLI and the matching coding-agent skill directly from the docs page. The kit ships with the BRIEF-DNA prompt composer, a live customer-facing pricing bridge, the Director cinematic vocabulary, ready-to-use anti-pattern and style libraries, and a hardened set of guardrails so agents render brand text and logos in-prompt, stay on the right model, and use all available image references instead of one.
New in v0.3: Slot 6 (visible text) is enforced before generate · gpt-image-2 is locked as the exclusive default with documented escape conditions · CLI --image-urls flag now supports up to 10 references · failure-mode tables for output drift and agent-behavior slips · phase-style briefs (Phase 1-9) map natively into the 12 slots.
ZIP with CLI, shell wrappers, the complete skill bundle (SKILL.md, 11 references, 2 config files, 6 helper scripts), agent config, and LLM README. Single file, drop into any agent's skills directory.
Raw onyx-cli.mjs. Supports --image-urls for up to 10 references (comma-separated or repeated). Use when your agent only needs the executable and handles placement itself.
Standalone SKILL.md entry point. Locks gpt-image-2 as default, enforces Slot 6 pre-flight, and routes the agent into the references / config / helper scripts shipped alongside.
quote-price.mjs — live customer credit + euro quote derived from src/utils/pricing.ts. Drop into any skill or invoke directly.
prompt-anatomy.md — the 12-slot BRIEF-DNA composer with hardened Slot 6, brand-asset rendering rules, and the phase-style input mapping. Use as a standalone reference for the prompt-engineering layer.
openai.yaml metadata for skill pickers and default prompts in agent runtimes.
Machine-oriented orientation for Codex, Claude Code, and similar coding agents.
Direct .cmd launcher for PowerShell and Windows terminals.
Shell launcher for macOS and Linux environments.
Invoke-WebRequest https://okta.studio/downloads/onyx-agent-kit -OutFile onyx-agent-kit.zip
Expand-Archive .\onyx-agent-kit.zip -DestinationPath .
$env:OKTA_API_KEY = "onyx_sk_your_api_key_here"
.\onyx.cmd --json models list --type imagecurl -L https://okta.studio/downloads/onyx-agent-kit -o onyx-agent-kit.zip
unzip onyx-agent-kit.zip
export OKTA_API_KEY="onyx_sk_your_api_key_here"
sh ./onyx --json models list --type imageOKTA_LLM_README.md, then place theskills/onyx-clifolder into your agent workspace if needed, then use the wrapper command for repeatable JSON-based API calls.API cost is the provider cost basis. Billed credits add 50% margin and 27% max VAT, then round up to whole credits.
| Model ID | Name | API Cost Basis | T2I | Edit | Resolutions |
|---|---|---|---|---|---|
| nano-banana-2 | Nano Banana 2 | $0.08 | 1K, 2K, 4K | ||
| nano-banana-pro | Nano Banana Pro | $0.15-0.30 | 1K, 2K, 4K | ||
| gpt-image-2 | GPT Image 2 | $0.01-0.41 API / 2-79 credits | 1K, 2K, 4K | ||
| grok-imagine-image | Grok Imagine | $0.02 T2I / edit ab $0.05 | 1K, 2K | ||
| seedream-v45 | Seedream 4.5 | $0.04 | 4K fixed (ratio only) | ||
| flux-2-turbo | FLUX.2 Turbo | $0.008/MP | 1K, 2K | ||
| flux-klein-9b | FLUX Klein 9B | $0.011/MP | - | 1K, 2K | |
| crystal-upscaler | Crystal Upscaler | $0.03/MP | - | auto |
/api/v1/modelsRetrieve all available image and video generation models with their capabilities and pricing.
Returns every model available for generation, grouped by type. Use the id field when calling the generate endpoints.
curl https://okta.studio/api/v1/models{
"data": [
{
"id": "nano-banana-2",
"name": "Nano Banana 2",
"type": "image",
"capabilities": {
"modes": ["text-to-image", "image-to-image"],
"resolutions": ["1K", "2K", "4K"],
"aspect_ratios": ["1:1", "16:9", "9:16", "4:3", "3:4"]
},
"pricing": {
"default_credits": 12,
"default_eur": 0.12,
"api_price_usd": 0.08
}
},
{
"id": "kling-2.6-pro",
"name": "Kling 2.6 Pro",
"type": "video",
"capabilities": {
"modes": ["text-to-video", "image-to-video"],
"duration_seconds": { "min": 5, "max": 10, "default": 5 },
"aspect_ratios": ["16:9", "9:16", "1:1"]
},
"pricing": {
"default_credits": 42,
"default_eur": 0.42,
"api_price_usd": 0.28
}
}
]
}| Status | Label | Description |
|---|---|---|
| 400 | Bad Request | Invalid request body or missing required fields. |
| 401 | Unauthorized | Missing or invalid API key. |
| 402 | Payment Required | Insufficient credits for the requested operation. |
| 403 | Forbidden | The API key does not have permission for this resource. |
| 429 | Rate Limited | Too many requests. Back off and retry after the window resets. |
| 500 | Server Error | An unexpected error occurred on the server. |
{
"error": "Human-readable error message",
"code": "MACHINE_READABLE_CODE"
}API requests are rate limited per API key. When the limit is exceeded, the server responds with HTTP 429. Inspect the following response headers to manage your request budget:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests in the current window. |
| X-RateLimit-Remaining | Remaining requests in the current window. |
| X-Credits-Remaining | Credit balance after the request completes. |