Developer documentation

Build reliable wrapper-code workflows.

Learn how to authenticate, run wrapper codes, upload files, download artifacts, track usage, and integrate Zywrap into production applications.

API-first workflow guide

Move from wrapper discovery to production API calls.

Wrapper-code runsPOST /v2/runs
FilesUpload and attach inputs
ArtifactsDownload generated outputs
Production controlsKeys, retries, usage ledger
Back to SDK docs
Runtime metadata

AI model sync for every API user

Zywrap keeps the offline catalog SDK Enterprise-only, but every authenticated API user can safely fetch and sync the current AI model list. This keeps integrations updated when new models are added or old models are retired.

Normal API key access

Use the same Zywrap API key used for V2 runs. No Enterprise catalog permission is required.

Delta-friendly sync

Pass fromVersion to receive only changed models and deleted model codes.

Catalog remains protected

Runtime sync does not expose wrappers, use cases, prompts, schemas, or offline bundle data.

Runtime AI model endpoints

These endpoints are intentionally separate from the Enterprise Catalog SDK endpoints. They are safe for normal API users and should be used by apps that show a model picker, cache supported models, or validate model codes before calling POST /v2/runs.

GET/v1/sdk/runtime/statusCheck whether runtime sync is reachable with the current API key.
GET/v1/sdk/runtime/modelsFetch the current safe AI model list as a full snapshot.
GET/v1/sdk/runtime/models/syncFetch a full snapshot or a delta when fromVersion is provided.
GET/v1/sdk/runtime/syncAlias for runtime model sync. Useful for generic client code.

Exposed metadata

  • AI model code and display name
  • Provider code and provider display name
  • Model/provider active status
  • Computed availability flag
  • Ordering and updatedAt timestamp
  • Deleted model codes for delta cleanup

Not exposed here

  • Enterprise catalog ZIP or offline bundle
  • Use cases, wrappers, prompt templates, or prompt logic
  • Input schemas, wrapper profiles, or hidden business rules
  • Billing logic, model routing rules, or provider credentials

Quick test with curl

Use the first request for a full list. Store newVersion, then pass it as fromVersion on future syncs.

bash
curl -s \
  -H "Authorization: Bearer YOUR_ZYWRAP_API_KEY" \
  https://api.zywrap.com/v1/sdk/runtime/models
bash
curl -s \
  -H "Authorization: Bearer YOUR_ZYWRAP_API_KEY" \
  "https://api.zywrap.com/v1/sdk/runtime/models/sync?fromVersion=2026-06-25T00:00:00.000Z"

Node.js runtime model sync example

This example keeps a local model cache fresh without downloading the Enterprise catalog bundle.

javascript
const ZYWRAP_API_KEY = process.env.ZYWRAP_API_KEY;
const API_BASE_URL = 'https://api.zywrap.com';

async function syncZywrapModels(fromVersion) {
  const url = new URL('/v1/sdk/runtime/models/sync', API_BASE_URL);
  if (fromVersion) {
    url.searchParams.set('fromVersion', fromVersion);
  }

  const response = await fetch(url, {
    headers: {
      Authorization: `Bearer ${ZYWRAP_API_KEY}`,
      Accept: 'application/json',
    },
  });

  if (!response.ok) {
    throw new Error(`Zywrap model sync failed: ${response.status} ${await response.text()}`);
  }

  const payload = await response.json();

  // Store this in your own app/database and pass it back next time.
  await saveRuntimeVersion(payload.newVersion);

  for (const model of payload.aiModels.upserts) {
    await upsertModel({
      code: model.code,
      name: model.name,
      providerCode: model.providerCode,
      providerName: model.providerName,
      available: model.available,
      status: model.status,
      ordering: model.ordering,
      updatedAt: model.updatedAt,
    });
  }

  for (const code of payload.aiModels.deletes) {
    await removeModel(code);
  }

  return payload;
}

Response shape

A missing fromVersion returns a full snapshot. A valid fromVersion returns a delta update.

json
{
  "success": true,
  "mode": "DELTA_UPDATE",
  "resource": "aiModels",
  "fromVersion": "2026-06-25T00:00:00.000Z",
  "newVersion": "2026-06-26T05:30:00.000Z",
  "aiModels": {
    "upserts": [
      {
        "code": "openai-gpt-4o-mini",
        "name": "GPT-4o mini",
        "providerCode": "openai",
        "providerName": "OpenAI",
        "status": true,
        "providerStatus": true,
        "available": true,
        "ordering": 10,
        "updatedAt": "2026-06-26T05:00:00.000Z"
      }
    ],
    "deletes": ["old-model-code"]
  }
}

Ready to run workflows?

After syncing models, use the selected model code with live Zywrap runs. Execution, prompt logic, files, artifacts, and usage ledger still stay on Zywrap APIs.

View API Reference