返回顶部
v

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, or text completions.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.2
安全检测
已通过
132
下载量
0
收藏
概述
安装方式
版本历史

vultr-inference

# 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 | Model | Description | |-------|-------------| | `flux.1-dev` | FLUX.1-dev - High quality | | `flux.1-schnell` | FLUX.1-schnell - Fast generation | | `stable-diffusion-3.5-medium` | SD 3.5 Medium - Balanced | ### Generate Image ```bash 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 | Parameter | Type | Description | |-----------|------|-------------| | `model` | string | `flux.1-dev`, `flux.1-schnell`, `stable-diffusion-3.5-medium` | | `prompt` | string | Text description of image | | `n` | int | Number of images (1-4) | | `size` | string | `256x256`, `512x512`, `1024x1024` | | `response_format` | string | `url` (default) or `b64_json` | ### Response ```json { "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 ```bash 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 | Parameter | Type | Description | |-----------|------|-------------| | `model` | string | Model ID from list above | | `messages` | array | Chat messages with role and content | | `max_tokens` | int | Maximum tokens to generate | | `temperature` | float | Randomness (0-2, default 1) | | `stream` | bool | Stream response (default false) | ## Python Example ```python 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 ```bash 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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 vultr-inference-1776270482 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 vultr-inference-1776270482 技能

通过命令行安装

skillhub install vultr-inference-1776270482

下载 Zip 包

⬇ 下载 vultr-inference v1.1.2

文件大小: 3.55 KB | 发布时间: 2026-4-17 16:31

v1.1.2 最新 2026-4-17 16:31
- Fixed model name typo: changed "stable-diffusion-3-5-medium" to "stable-diffusion-3.5-medium" in documentation.
- Updated all references and usage instructions to match the correct model name.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部