> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

export const ModelDetails = ({provider, type, computeUnits, pricing, estimatedTime, capabilities, endpoint}) => {
  return <div className="space-y-3">
      <div className="grid grid-cols-2 gap-3 text-sm">
        <div>
          <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1">Provider</div>
          <div className="font-mono text-gray-900 dark:text-gray-100">{provider}</div>
        </div>
        <div>
          <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1">Type</div>
          <div className="font-mono text-gray-900 dark:text-gray-100">{type}</div>
        </div>
        {pricing ? <div>
            <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1">Pricing</div>
            <div className="font-mono text-gray-900 dark:text-gray-100">{pricing}</div>
          </div> : computeUnits && <div>
            <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1">Compute Units</div>
            <div className="font-mono text-gray-900 dark:text-gray-100">{computeUnits}</div>
          </div>}
        <div>
          <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1">Estimated Time</div>
          <div className="font-mono text-gray-900 dark:text-gray-100">{estimatedTime}</div>
        </div>
      </div>

      {capabilities && capabilities.length > 0 && <div>
          <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1.5">Capabilities</div>
          <div className="flex flex-wrap gap-1.5">
            {capabilities.map((capability, i) => <span key={i} className="text-xs px-2 py-0.5 rounded bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 font-medium">
                {capability}
              </span>)}
          </div>
        </div>}

      <div>
        <div className="text-gray-500 dark:text-gray-400 text-xs font-medium mb-1">Endpoint</div>
        <code className="text-xs px-2 py-1 rounded bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100 font-mono">
          {endpoint}
        </code>
      </div>
    </div>;
};

export const ModelAccordionGroup = ({children}) => {
  return <div className="not-prose">{children}</div>;
};

export const ModelAccordion = ({provider, title, children}) => {
  const [isOpen, setIsOpen] = useState(false);
  const providerLogos = {
    bfl: {
      light: '/images/logo/bfl-light.svg',
      dark: '/images/logo/bfl-dark.svg'
    },
    krea: {
      light: '/images/logo/krea-logo-icon-light.svg',
      dark: '/images/logo/krea-logo-icon-dark.svg'
    },
    bytedance: {
      light: '/images/logo/bytedance-light.svg',
      dark: '/images/logo/bytedance-dark.svg'
    },
    openai: {
      light: '/images/logo/openai-light.svg',
      dark: '/images/logo/openai-dark.svg'
    },
    deepmind: {
      light: '/images/logo/deepmind-light.svg',
      dark: '/images/logo/deepmind-dark.svg'
    },
    qwen: {
      light: '/images/logo/qwen-light.svg',
      dark: '/images/logo/qwen-dark.svg'
    },
    kling: {
      light: '/images/logo/kling-light.svg',
      dark: '/images/logo/kling-dark.svg'
    }
  };
  const logos = providerLogos[provider];
  return <details className="group border-b border-gray-200 dark:border-gray-800" open={isOpen}>
      <summary className="flex items-center gap-2.5 py-3 px-0 cursor-pointer list-none hover:opacity-70 transition-opacity" onClick={e => {
    e.preventDefault();
    setIsOpen(!isOpen);
  }}>
        <svg className={`w-3.5 h-3.5 flex-shrink-0 text-gray-500 dark:text-gray-400 transition-transform ${isOpen ? 'rotate-90' : ''}`} fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}>
          <path strokeLinecap="round" strokeLinejoin="round" d="M9 5l7 7-7 7" />
        </svg>
        {logos && <>
            <img src={logos.light} alt={provider} className="h-4 w-4 flex-shrink-0 dark:hidden" />
            <img src={logos.dark} alt={provider} className="h-4 w-4 flex-shrink-0 hidden dark:inline-block" />
          </>}
        <span className="font-medium text-gray-900 dark:text-gray-100">{title}</span>
      </summary>
      {isOpen && <div className="pb-4 pl-7">
          <div className="not-prose">
            {children}
          </div>
        </div>}
    </details>;
};

<a href="/developers/krea-2/overview" className="not-prose group relative block mb-8 aspect-[2/1] h-[40vh] w-full rounded-lg overflow-hidden">
  <img src="https://s.krea.ai/docs/krea-2-hero.webp" alt="" className="absolute inset-0 m-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105" style={{ objectPosition: "20% 20%" }} />

  <div className="absolute inset-0 bg-gradient-to-t from-black/75 via-black/35 to-black/10 dark:from-black/85 dark:via-black/45 dark:to-black/20" />

  <div className="relative h-full flex flex-col justify-end p-8">
    <h1 className="text-4xl md:text-5xl font-bold text-white m-0 drop-shadow-[0_2px_4px_rgba(0,0,0,0.5)]">
      Krea 2
    </h1>

    <p className="text-base md:text-lg text-white/95 mt-2 max-w-2xl drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]">
      Our first foundation image model. Trained from scratch for full creative control — style transfer, moodboards, and tunable creativity.
    </p>

    <div className="mt-4">
      <span className="inline-flex items-center px-4 py-2 rounded-lg bg-white text-black text-sm font-medium group-hover:opacity-90 transition-opacity">
        Get started

        <svg className="ml-1.5 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
        </svg>
      </span>
    </div>
  </div>
</a>

<Note>
  **Before you start**, generate an API token at [krea.ai/settings/api-tokens](https://www.krea.ai/settings/api-tokens). See [API Keys & Billing](/developers/api-keys-and-billing) for help.
</Note>

## Popular Models

Pick a model below for a quick start, or browse all available endpoints in [Model APIs](/api-reference/introduction).

### Image Generation

<ModelAccordionGroup>
  <ModelAccordion provider="krea" title="Krea 2 — our flagship foundation model">
    <ModelDetails provider="Krea" type="image" pricing="From $0.030" estimatedTime="~10 seconds" capabilities={['text-to-image', 'style-transfer', 'moodboards', 'creativity-control']} endpoint="/generate/image/krea/krea-2/medium" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const result = await krea.subscribe("image/krea/krea-2/medium", {
        input: {
          prompt: "A cinematic product photo of a glass lamp on a marble table",
          aspect_ratio: "4:5",
          resolution: "1K",
          creativity: "medium"
        },
      });

      console.log(result.data?.urls[0]);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/image/krea/krea-2/medium \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "A cinematic product photo of a glass lamp on a marble table",
          "aspect_ratio": "4:5",
          "resolution": "1K",
          "creativity": "medium"
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/image/krea/krea-2/medium",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "A cinematic product photo of a glass lamp on a marble table",
              "aspect_ratio": "4:5",
              "resolution": "1K",
              "creativity": "medium"
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt":       "A cinematic product photo of a glass lamp on a marble table",
              "aspect_ratio": "4:5",
              "resolution":   "1K",
              "creativity":   "medium",
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/image/krea/krea-2/medium", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>

  <ModelAccordion provider="deepmind" title="Nano Banana Pro - Superior typography and photorealistic detail">
    <ModelDetails provider="Google" type="image" pricing="From $0.15" estimatedTime="~24 seconds" capabilities={['text-to-image', 'image-to-image', 'superb typography']} endpoint="/generate/image/google/nano-banana-pro" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const job = await krea.image("google/nano-banana-pro", {
        prompt: "a futuristic cityscape with neon lights at night, in the style of a graphic novel",
        aspect_ratio: "1:1",
        resolution: "1K"
      });

      console.log(`Job ID: ${job.job_id}`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/image/google/nano-banana-pro \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "a futuristic cityscape with neon lights at night, in the style of a graphic novel",
          "aspect_ratio": "1:1",
          "resolution": "1K"
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/image/google/nano-banana-pro",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "a futuristic cityscape with neon lights at night, in the style of a graphic novel",
              "aspect_ratio": "1:1",
              "resolution": "1K"
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt": "a futuristic cityscape with neon lights at night, in the style of a graphic novel",
              "aspect_ratio": "1:1",
              "resolution": "1K",
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/image/google/nano-banana-pro", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>

  <ModelAccordion provider="bytedance" title="Seedream 4 - High quality model for photorealism and text rendering">
    <ModelDetails provider="ByteDance" type="image" pricing="$0.0315" estimatedTime="~20 seconds" capabilities={['text-to-image', 'image-to-image', 'flexible-resolution']} endpoint="/generate/image/bytedance/seedream-4" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const job = await krea.image("bytedance/seedream-4", {
        prompt: "a photorealistic portrait of a person reading in a cozy library",
        width: 1024,
        height: 1024
      });

      console.log(`Job ID: ${job.job_id}`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/image/bytedance/seedream-4 \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "a photorealistic portrait of a person reading in a cozy library",
          "width": 1024,
          "height": 1024
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/image/bytedance/seedream-4",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "a photorealistic portrait of a person reading in a cozy library",
              "width": 1024,
              "height": 1024
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt": "a photorealistic portrait of a person reading in a cozy library",
              "width": 1024,
              "height": 1024,
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/image/bytedance/seedream-4", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>

  <ModelAccordion provider="openai" title="GPT Image 2 - High quality generation and editing with strong prompt adherence">
    <ModelDetails provider="OpenAI" type="image" pricing="From $0.009" estimatedTime="~55 seconds" capabilities={['text-to-image', 'image-to-image', 'style-transfer']} endpoint="/generate/image/openai/gpt-image-2" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const job = await krea.image("openai/gpt-image-2", {
        prompt: "an intricate steampunk airship flying through clouds at golden hour",
        aspect_ratio: "1:1",
        resolution: "1K"
      });

      console.log(`Job ID: ${job.job_id}`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/image/openai/gpt-image-2 \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "an intricate steampunk airship flying through clouds at golden hour",
          "aspect_ratio": "1:1",
          "resolution": "1K"
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/image/openai/gpt-image-2",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "an intricate steampunk airship flying through clouds at golden hour",
              "aspect_ratio": "1:1",
              "resolution": "1K"
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt": "an intricate steampunk airship flying through clouds at golden hour",
              "aspect_ratio": "1:1",
              "resolution": "1K",
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/image/openai/gpt-image-2", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>
</ModelAccordionGroup>

### Video Generation

<ModelAccordionGroup>
  <ModelAccordion provider="deepmind" title="Veo 3.1 - Google's latest video generation model">
    <ModelDetails provider="Google" type="video" pricing="From $0.20/sec" estimatedTime="~5 minutes" capabilities={['text-to-video', 'image-to-video', 'high-quality']} endpoint="/generate/video/google/veo-3.1" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const job = await krea.video("google/veo-3.1", {
        prompt: "a time-lapse of a bustling city street from day to night",
        aspect_ratio: "16:9",
        duration: 6,
        resolution: "720p"
      });

      console.log(`Job ID: ${job.job_id}`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/video/google/veo-3.1 \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "a time-lapse of a bustling city street from day to night",
          "aspect_ratio": "16:9",
          "duration": 6,
          "resolution": "720p"
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/video/google/veo-3.1",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "a time-lapse of a bustling city street from day to night",
              "aspect_ratio": "16:9",
              "duration": 6,
              "resolution": "720p"
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt": "a time-lapse of a bustling city street from day to night",
              "aspect_ratio": "16:9",
              "duration": 6,
              "resolution": "720p",
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/video/google/veo-3.1", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>

  <ModelAccordion provider="kling" title="Kling 3.0 - Latest frontier model from Kling">
    <ModelDetails provider="Kling" type="video" pricing="From $0.17/sec" estimatedTime="~3 minutes" capabilities={['text-to-video', 'image-to-video', 'native-audio', 'up-to-15s']} endpoint="/generate/video/kling/kling-3.0" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const job = await krea.video("kling/kling-3.0", {
        prompt: "a cinematic tracking shot through a lantern-lit market at night",
        aspect_ratio: "16:9",
        duration: 5,
        mode: "std"
      });

      console.log(`Job ID: ${job.job_id}`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/video/kling/kling-3.0 \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "a cinematic tracking shot through a lantern-lit market at night",
          "aspect_ratio": "16:9",
          "duration": 5,
          "mode": "std"
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/video/kling/kling-3.0",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "a cinematic tracking shot through a lantern-lit market at night",
              "aspect_ratio": "16:9",
              "duration": 5,
              "mode": "std"
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt": "a cinematic tracking shot through a lantern-lit market at night",
              "aspect_ratio": "16:9",
              "duration": 5,
              "mode": "std",
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/video/kling/kling-3.0", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>

  <ModelAccordion provider="qwen" title="Wan 2.5 - Fast, high-quality model from Alibaba">
    <ModelDetails provider="Alibaba" type="video" pricing="From $0.0525/sec" estimatedTime="~3 minutes" capabilities={['text-to-video', 'image-to-video']} endpoint="/generate/video/alibaba/wan-2.5" />

    **Example Usage:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      // npm install @krea-ai/sdk
      import { Krea } from "@krea-ai/sdk";

      const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

      const job = await krea.video("alibaba/wan-2.5", {
        prompt: "a drone flying over a tropical beach at sunset",
        duration: 5
      });

      console.log(`Job ID: ${job.job_id}`);
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.krea.ai/generate/video/alibaba/wan-2.5 \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "prompt": "a drone flying over a tropical beach at sunset",
          "duration": 5
        }'
      ```

      ```python Python theme={null}
      import requests

      API_BASE = "https://api.krea.ai"
      API_TOKEN = "your-token-secret"

      response = requests.post(
          f"{API_BASE}/generate/video/alibaba/wan-2.5",
          headers={
              "Authorization": f"Bearer {API_TOKEN}",
              "Content-Type": "application/json"
          },
          json={
              "prompt": "a drone flying over a tropical beach at sunset",
              "duration": 5
          }
      )

      job = response.json()
      print(f"Job ID: {job['job_id']}")
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          apiBase := "https://api.krea.ai"
          apiToken := "your-token-secret"

          payload := map[string]interface{}{
              "prompt": "a drone flying over a tropical beach at sunset",
              "duration": 5,
          }

          jsonData, _ := json.Marshal(payload)
          req, _ := http.NewRequest("POST", apiBase+"/generate/video/alibaba/wan-2.5", bytes.NewBuffer(jsonData))
          req.Header.Set("Authorization", "Bearer "+apiToken)
          req.Header.Set("Content-Type", "application/json")

          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()

          var job map[string]interface{}
          json.NewDecoder(resp.Body).Decode(&job)
          fmt.Printf("Job ID: %s\n", job["job_id"])
      }
      ```
    </CodeGroup>
  </ModelAccordion>
</ModelAccordionGroup>

## More Models

For a list of all available models, see the [Model APIs](/api-reference/introduction) page.
