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

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

PowerShell install

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

macOS / Linux install

bash
curl -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 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/onyx-clifolder into your agent workspace if needed, then use the wrapper command for repeatable JSON-based API calls.

Available Image Models

API cost is the provider cost basis. Billed credits add 50% margin and 27% max VAT, then round up to whole credits.

Model IDNameAPI Cost BasisT2IEditResolutions
nano-banana-2Nano Banana 2$0.081K, 2K, 4K
nano-banana-proNano Banana Pro$0.15-0.301K, 2K, 4K
gpt-image-2GPT Image 2$0.01-0.41 API / 2-79 credits1K, 2K, 4K
grok-imagine-imageGrok Imagine$0.02 T2I / edit ab $0.051K, 2K
seedream-v45Seedream 4.5$0.044K fixed (ratio only)
flux-2-turboFLUX.2 Turbo$0.008/MP1K, 2K
flux-klein-9bFLUX Klein 9B$0.011/MP-1K, 2K
crystal-upscalerCrystal Upscaler$0.03/MP-auto

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,
        "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
      }
    }
  ]
}

Error Codes

StatusLabelDescription
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.
429Rate LimitedToo many requests. Back off and retry after the window resets.
500Server ErrorAn unexpected error occurred on the server.

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