Quickstart

Go from zero to your first AI-generated content in under 5 minutes — via REST, MCP, or Vydra's native OpenClaw media provider.

1. Get Your API Key

Sign in to the API Keys page in your dashboard and create a new key. Copy it immediately — it won't be shown again.

Save your key

The full API key is only displayed once at creation. Store it somewhere safe (e.g. a .env file or secret manager).

2. Make Your First Request

Generate an image with a single curl command. Replace YOUR_API_KEY with the key you just created.

Generate an Image (curl)bash
curl -X POST https://vydra.ai/api/v1/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "generate_image",
    "input": {
      "prompt": "A futuristic city skyline at sunset, cinematic lighting",
      "model": "gemini-image"
    }
  }'

Or in JavaScript / Node.js:

Generate an Image (JavaScript)javascript
const res = await fetch("https://vydra.ai/api/v1/jobs", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    workflow: "generate_image",
    input: {
      prompt: "A futuristic city skyline at sunset, cinematic lighting",
      model: "gemini-image",
    },
  }),
});

const job = await res.json();
console.log(job);

Or in Python:

Generate an Image (Python)python
import requests

resp = requests.post(
    "https://vydra.ai/api/v1/jobs",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "workflow": "generate_image",
        "input": {
            "prompt": "A futuristic city skyline at sunset, cinematic lighting",
            "model": "gemini-image",
        },
    },
)
print(resp.json())

3. Use Vydra from OpenClaw or MCP

If you are using OpenClaw, the bundled vydra provider reads VYDRA_API_KEY and exposes Vydra through native image, video, and speech tools. Other agent clients can use the MCP server.

OpenClaw Provider Authbash
export VYDRA_API_KEY="vydra_live_..."
# or authenticate through OpenClaw onboarding:
openclaw onboard --auth-choice vydra-api-key
OpenClaw Model Defaultsjson
{
  "agents": {
    "defaults": {
      "imageGenerationModel": {
        "primary": "vydra/grok-imagine"
      },
      "videoGenerationModel": {
        "primary": "vydra/veo3"
      }
    }
  }
}
OpenClaw Agent Callspython
image_generate(model="vydra/grok-imagine")
video_generate(model="vydra/veo3")
# speech provider model: vydra/elevenlabs/tts
MCP Client Configurationjson
{
  "mcpServers": {
    "vydra": {
      "command": "npx",
      "args": ["-y", "vydra-mcp"],
      "env": {
        "VYDRA_API_KEY": "vydra_live_..."
      }
    }
  }
}

4. Check the Response

A successful request returns a job object with status and output info:

Example Responsejson
{
  "id": "a1b2c3d4-...",
  "status": "completed",
  "workflow": "generate_image",
  "creditsCharged": 5,
  "createdAt": "2025-07-15T12:00:00.000Z",
  "_links": {
    "self": "https://vydra.ai/api/v1/jobs/a1b2c3d4-...",
    "status": "https://vydra.ai/api/v1/jobs/a1b2c3d4-..."
  }
}

For longer-running jobs (videos, lipsync), the initial status will be pending or running. Poll the job URL or use a webhook to get notified on completion.

5. Poll for Results

For async workflows, check the job status until it completes:

Check Job Statusbash
curl https://vydra.ai/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Common Errors

CodeMeaningFix
401Invalid or missing API keyCheck your Authorization header
402Insufficient creditsBuy credits
429Rate limitedWait and retry; check Retry-After header

Next Steps