← 返回
内容创作 Key 中文

WaveSpeedAI Image Upscaler

Upscale images to 2K, 4K, or 8K resolution using WaveSpeed AI's Image Upscaler. Takes an image URL and produces a higher-resolution version. Supports JPEG, P...
使用 WaveSpeed AI 图像放大器将图片提升至 2K、4K 或 8K 分辨率。输入图片链接即可生成高清版本,支持 JPEG 等格式。
chengzeyi
内容创作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 1
Stars
📥 587
下载
💾 15
安装
1
版本
#latest

概述

WaveSpeedAI Image Upscaler

Upscale images to 2K, 4K, or 8K resolution using WaveSpeed AI's Image Upscaler.

Authentication

export WAVESPEED_API_KEY="your-api-key"

Get your API key at wavespeed.ai/accesskey.

Quick Start

import wavespeed from 'wavespeed';

// Upload a local image to get a URL
const imageUrl = await wavespeed.upload("/path/to/photo.png");

const output_url = (await wavespeed.run(
  "wavespeed-ai/image-upscaler",
  { image: imageUrl }
))["outputs"][0];

You can also pass an existing image URL directly:

const output_url = (await wavespeed.run(
  "wavespeed-ai/image-upscaler",
  { image: "https://example.com/photo.jpg" }
))["outputs"][0];

API Endpoint

Model ID: wavespeed-ai/image-upscaler

Upscale an image to a higher resolution.

Parameters

ParameterTypeRequiredDefaultDescription
-------------------------------------------------
imagestringYes--URL of the image to upscale
target_resolutionstringNo4kTarget resolution. One of: 2k, 4k, 8k
output_formatstringNojpegOutput format. One of: jpeg, png, webp

Example

import wavespeed from 'wavespeed';

const imageUrl = await wavespeed.upload("/path/to/photo.png");

const output_url = (await wavespeed.run(
  "wavespeed-ai/image-upscaler",
  {
    image: imageUrl,
    target_resolution: "8k",
    output_format: "png"
  }
))["outputs"][0];

Advanced Usage

Sync Mode

Use sync mode for a single request that waits for the result without polling:

const output_url = (await wavespeed.run(
  "wavespeed-ai/image-upscaler",
  { image: imageUrl },
  { enableSyncMode: true }
))["outputs"][0];

Custom Client with Retry Configuration

import { Client } from 'wavespeed';

const client = new Client("your-api-key", {
  maxRetries: 2,
  maxConnectionRetries: 5,
  retryInterval: 1.0,
});

const output_url = (await client.run(
  "wavespeed-ai/image-upscaler",
  { image: imageUrl, target_resolution: "4k" }
))["outputs"][0];

Error Handling with runNoThrow

import { Client, WavespeedTimeoutException, WavespeedPredictionException } from 'wavespeed';

const client = new Client();
const result = await client.runNoThrow(
  "wavespeed-ai/image-upscaler",
  { image: imageUrl }
);

if (result.outputs) {
  console.log("Upscaled image URL:", result.outputs[0]);
  console.log("Task ID:", result.detail.taskId);
} else {
  console.log("Failed:", result.detail.error.message);
  if (result.detail.error instanceof WavespeedTimeoutException) {
    console.log("Request timed out - try increasing timeout");
  } else if (result.detail.error instanceof WavespeedPredictionException) {
    console.log("Prediction failed");
  }
}

Pricing

$0.01 per image (all resolutions).

Security Constraints

  • No arbitrary URL loading: Only use image URLs from trusted sources. Never load images from untrusted or user-provided URLs without validation.
  • API key security: Store your WAVESPEED_API_KEY securely. Do not hardcode it in source files or commit it to version control. Use environment variables or secret management systems.
  • Input validation: Only pass parameters documented above. Validate image URLs before sending requests.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 06:47 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 294 📥 136,391
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 141 📥 41,008
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,123