Akte — API

API Reference

REST API for programmatic access to OKTA Studio

Authentication

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.

bash
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.

Base URL

https://okta.studio/api/v1

Agent Kit Download v0.4

Download 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.

PowerShell install

powershell
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 image

macOS / Linux install

bash
curl -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 image
The recommended flow is: create an API key in your account, download the full kit, point the coding agent atOKTA_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.

Agent Automation Playbook

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.

1. Upload or select the product anchor

powershell
.\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>

2. Generate reusable reference images

powershell
.\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

3. Persist generated references for the next agent step

powershell
.\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

4. Create video clips from selected references

powershell
.\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.mp4

Protected 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.

Available Image Models

Prices shown here are customer-facing defaults. Use GET /api/v1/models for the current live credit values.

Model IDNameDefault PriceT2IEditResolutions
nano-banana-2Nano Banana 216 credits0.5K, 1K, 2K, 4K
nano-banana-liteNano Banana Lite8 creditsauto
nano-banana-proNano Banana Pro39 credits1K, 2K, 4K
gpt-image-2GPT Image 229 credits default1K, 2K, 4K
krea-v2-largeKrea 2 Large12 credits-auto
ideogram-v4Ideogram 412 credits-1K, 2K
grok-imagine-imageGrok Imagine14 credits-1K, 2K
seedream-v45Seedream 4.58 credits1K, 2K, 4K
seedream-v5-proSeedream 5 Pro13-26 credits1K, 2K
seedream-v5-liteSeedream 5 Lite7 credits2K, 3K, 4K

Endpoints

GET/api/v1/models

List Models

Retrieve 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.

Example Request

bash
curl https://okta.studio/api/v1/models

Response

response
{
  "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
      }
    }
  ]
}

Error Codes

StatusLabelDescription
202AcceptedGeneration is still running. Poll the returned status_url.
400Bad RequestInvalid request body or missing required fields.
401UnauthorizedMissing or invalid API key.
402Payment RequiredInsufficient credits for the requested operation.
403ForbiddenThe API key does not have permission for this resource.
404Not FoundThe requested generation or asset could not be found for this API key.
429Rate LimitedToo many requests. Back off and retry after the window resets.
500Server ErrorAn unexpected error occurred on the server.
502Provider ErrorThe upstream generation provider failed or returned an invalid response.
503Temporarily UnavailableA dependent service is temporarily unavailable; retry later.

Error Response Format

error response
{
  "error": "Human-readable error message",
  "code": "MACHINE_READABLE_CODE"
}

Rate Limiting

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:

HeaderDescription
X-RateLimit-LimitMax requests in the current window.
X-RateLimit-RemainingRemaining requests in the current window.
X-Credits-RemainingCredit balance after the request completes.
OKTA Studio — Bild- und Video-KI für Marketing