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.4: agent install commands now include the extracted okta-agent-kit folder · media-library upload, download and protected URL handoff are documented as the default agent workflow · product-photo to reference-image to video-clip automation has a canonical playbook · 90-second videos are treated as planned multi-clip jobs until a dedicated storyboard/render endpoint exists.
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 CLI executable. Supports --image-urls for up to 10 references (comma-separated or repeated). Use when your agent only needs the executable and handles placement itself.
SKILL.md entry point for skill-aware runtimes. Use the full kit when the agent also needs the references, config and helper scripts it routes into.
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/okta-agent-kit -OutFile okta-agent-kit.zip
Expand-Archive .\okta-agent-kit.zip -DestinationPath .
Set-Location .\okta-agent-kit
$env:OKTA_API_KEY = "onyx_sk_your_api_key_here"
.\okta.cmd --json models list --type imagecurl -L https://okta.studio/downloads/okta-agent-kit -o okta-agent-kit.zip
unzip okta-agent-kit.zip
cd okta-agent-kit
export OKTA_API_KEY="onyx_sk_your_api_key_here"
sh ./okta --json models list --type imageOKTA_LLM_README.md, then place theskills/okta-clifolder into your agent workspace if needed, then use the wrapper command for repeatable JSON-based API calls.Use this sequence when a coding agent should turn an existing product photo into reusable references and then into video clips. The media library is the handoff layer: uploaded files, generated outputs and selected references all become protected asset URLs that the API resolves server-side when the same Bearer token is used.
.\okta.cmd --json assets upload --file ./input/product.png --name product.png --retention-type pinned
.\okta.cmd --json assets list --source upload --search product --limit 10
.\okta.cmd --json assets select --id <product_asset_id>.\okta.cmd --json image edit `
--model gpt-image-2 `
--prompt "Create a clean ecommerce hero reference from this product photo; preserve product identity and visible text." `
--image-url "https://okta.studio/api/v1/assets/<product_asset_id>/content" `
--aspect-ratio 1:1 `
--quality medium `
--output ./output/reference-01.png.\okta.cmd --json assets upload --file ./output/reference-01.png --name reference-01.png --retention-type pinned
.\okta.cmd --json assets select --id <reference_asset_id> --output ./output/reference-01-check.png.\okta.cmd --json video create `
--model veo-3.1-fast `
--prompt "Shot 01: slow cinematic orbit around the product, premium studio lighting, no text overlays." `
--image-url "https://okta.studio/api/v1/assets/<reference_asset_id>/content" `
--duration 8 `
--aspect-ratio 16:9 `
--wait `
--output ./output/shot-01.mp4Protected URLs: asset URLs are not public CDN links. Send the same API key or let the CLI download them with --output.
Long videos: current public video models create short clips. A 90-second result should be planned as multiple 6-15 second shots and assembled after generation.
Agent memory: save job IDs, prompts, asset IDs, output paths and credit usage so Codex or Claude Code can continue the campaign without guessing.
Prices shown here are customer-facing defaults. Use GET /api/v1/models for the current live credit values.
| Model ID | Name | Default Price | T2I | Edit | Resolutions |
|---|---|---|---|---|---|
| nano-banana-2 | Nano Banana 2 | 16 credits | 0.5K, 1K, 2K, 4K | ||
| nano-banana-lite | Nano Banana Lite | 8 credits | auto | ||
| nano-banana-pro | Nano Banana Pro | 39 credits | 1K, 2K, 4K | ||
| gpt-image-2 | GPT Image 2 | 29 credits default | 1K, 2K, 4K | ||
| krea-v2-large | Krea 2 Large | 12 credits | - | auto | |
| ideogram-v4 | Ideogram 4 | 12 credits | - | 1K, 2K | |
| grok-imagine-image | Grok Imagine | 14 credits | - | 1K, 2K | |
| seedream-v45 | Seedream 4.5 | 8 credits | 1K, 2K, 4K | ||
| seedream-v5-pro | Seedream 5 Pro | 13-26 credits | 1K, 2K | ||
| seedream-v5-lite | Seedream 5 Lite | 7 credits | 2K, 3K, 4K |
/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,
"strategy": "fixed"
}
},
{
"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
}
}
]
}| Status | Label | Description |
|---|---|---|
| 202 | Accepted | Generation is still running. Poll the returned status_url. |
| 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. |
| 404 | Not Found | The requested generation or asset could not be found for this API key. |
| 429 | Rate Limited | Too many requests. Back off and retry after the window resets. |
| 500 | Server Error | An unexpected error occurred on the server. |
| 502 | Provider Error | The upstream generation provider failed or returned an invalid response. |
| 503 | Temporarily Unavailable | A dependent service is temporarily unavailable; retry later. |
{
"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. |