← 返回
未分类 Key 中文

Vultr Inference

Generate images and text using Vultr Inference API. Supports Flux image generation and various LLMs for text. Use when user wants to generate images, artwork...
使用 Vultr Inference API 生成图像和文本,支持 Flux 图像生成和多种 LLM,适用于需要生成图像或艺术作品的场景。
happytreees happytreees 来源
未分类 clawhub v1.1.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 447
下载
💾 0
安装
1
版本
#latest

概述

vultr-inference

Generate images and text using Vultr's Inference API.

Setup

Uses the same API key as Vultr Cloud API. Store it at:

~/.config/vultr/api_key

Image Generation

Available Models

ModelDescription
--------------------
flux.1-devFLUX.1-dev - High quality
flux.1-schnellFLUX.1-schnell - Fast generation
stable-diffusion-3.5-mediumSD 3.5 Medium - Balanced

Generate Image

curl -X POST "https://api.vultrinference.com/v1/images/generations" \
  -H "Authorization: Bearer $VULTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux.1-schnell",
    "prompt": "a hedgehog eating a burger in Amsterdam",
    "n": 1,
    "size": "1024x1024"
  }'

Parameters

ParameterTypeDescription
------------------------------
modelstringflux.1-dev, flux.1-schnell, stable-diffusion-3.5-medium
promptstringText description of image
nintNumber of images (1-4)
sizestring256x256, 512x512, 1024x1024
response_formatstringurl (default) or b64_json

Response

{
  "created": 1734567890,
  "data": [
    {
      "url": "https://ewr.vultrobjects.com/vultrinference-images/tmp_xxx.png"
    }
  ]
}

Text Generation (Chat Completions)

Available Models

  • llama-3.1-405b-instruct - Meta Llama 3.1 405B
  • llama-3.1-70b-instruct - Meta Llama 3.1 70B
  • llama-3.1-8b-instruct - Meta Llama 3.1 8B
  • mixtral-8x7b-32768 - Mixtral 8x7B
  • qwen-2-72b-instruct - Qwen 2 72B

Chat Completion

curl -X POST "https://api.vultrinference.com/v1/chat/completions" \
  -H "Authorization: Bearer $VULTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.1-70b-instruct",
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ],
    "max_tokens": 100
  }'

Parameters

ParameterTypeDescription
------------------------------
modelstringModel ID from list above
messagesarrayChat messages with role and content
max_tokensintMaximum tokens to generate
temperaturefloatRandomness (0-2, default 1)
streamboolStream response (default false)

Python Example

import os
import requests

API_KEY = open(os.path.expanduser("~/.config/vultr/api_key")).read().strip()

# Generate image
response = requests.post(
    "https://api.vultrinference.com/v1/images/generations",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "model": "flux.1-schnell",
        "prompt": "a hedgehog eating a burger",
        "size": "512x512",
        "n": 1
    }
)

result = response.json()
image_url = result["data"][0]["url"]
print(f"Image URL: {image_url}")

# Download image
img_response = requests.get(image_url)
with open("generated_image.png", "wb") as f:
    f.write(img_response.content)

List Available Models

curl -s "https://api.vultrinference.com/v1/models" \
  -H "Authorization: Bearer $VULTR_API_KEY" | jq

Troubleshooting

401 Unauthorized

  • Check API key is valid
  • Ensure key has inference permissions

400 Bad Request

  • Check model name is correct
  • Check size is valid (256x256, 512x512, 1024x1024)
  • Check prompt is not empty

Rate Limits

  • Default: 60 requests per minute
  • Contact support for higher limits

版本历史

共 1 个版本

  • v1.1.2 当前
    2026-05-03 06:52 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 430 📥 117,228
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 218 📥 47,974
it-ops-security

Vultr

happytreees
管理Vultr云基础设施,包括VPS实例、物理服务器、Kubernetes集群、数据库、DNS、防火墙、VPC、对象存储等。使用wh...
★ 1 📥 839