跳转到主要内容
GET
/
models
/api/v1/models
curl --request GET \
  --url https://api.venice.ai/api/v1/models \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "created": 1727966436,
      "id": "llama-3.2-3b",
      "model_spec": {
        "availableContextTokens": 131072,
        "capabilities": {
          "optimizedForCode": false,
          "quantization": "fp16",
          "supportsAudioInput": false,
          "supportsFunctionCalling": true,
          "supportsLogProbs": true,
          "supportsMultipleImages": false,
          "supportsReasoning": false,
          "supportsReasoningEffort": false,
          "supportsResponseSchema": true,
          "supportsTeeAttestation": false,
          "supportsE2EE": false,
          "supportsVision": false,
          "supportsVideoInput": false,
          "supportsWebSearch": true,
          "supportsXSearch": false
        },
        "constraints": {
          "temperature": {
            "default": 0.8
          },
          "top_p": {
            "default": 0.9
          }
        },
        "description": "Compact and efficient model for quick responses and lighter workloads.",
        "name": "Llama 3.2 3B",
        "modelSource": "https://huggingface.co/meta-llama/Llama-3.2-3B",
        "offline": false,
        "privacy": "private",
        "pricing": {
          "input": {
            "usd": 0.15,
            "diem": 0.15
          },
          "output": {
            "usd": 0.6,
            "diem": 0.6
          }
        },
        "traits": [
          "fastest"
        ]
      },
      "object": "model",
      "owned_by": "venice.ai",
      "type": "text"
    }
  ],
  "object": "list",
  "type": "text"
}

质量等级定价

对于接受可选 quality 参数的图像模型(当前为 gpt-image-2gpt-image-2-edit),响应在 model_spec.pricing.quality 下提供按质量划分的价格矩阵。每个顶级键是一个分辨率等级(1K2K4K),每个嵌套键是一个质量等级(lowmediumhigh),各自带有自己的 usddiem 价格:
"pricing": {
  "resolutions": {
    "1K": { "usd": 0.27, "diem": 0.27 },
    "2K": { "usd": 0.51, "diem": 0.51 },
    "4K": { "usd": 0.84, "diem": 0.84 }
  },
  "quality": {
    "1K": {
      "low":    { "usd": 0.02, "diem": 0.02 },
      "medium": { "usd": 0.07, "diem": 0.07 },
      "high":   { "usd": 0.26, "diem": 0.26 }
    },
    "2K": {
      "low":    { "usd": 0.03, "diem": 0.03 },
      "medium": { "usd": 0.13, "diem": 0.13 },
      "high":   { "usd": 0.50, "diem": 0.50 }
    },
    "4K": {
      "low":    { "usd": 0.05, "diem": 0.05 },
      "medium": { "usd": 0.21, "diem": 0.21 },
      "high":   { "usd": 0.83, "diem": 0.83 }
    }
  }
}
pricing.resolutions 是为向后兼容而保留的旧版按图像价格表。pricing.quality 是按(分辨率,质量)组合的矩阵,每当 quality 参数被支持时即适用。两个字段都会保留在响应中,以便客户端检测质量支持并在自己的 UI 中展示该矩阵。

Postman 集合

如需更多示例,请参阅此 Postman 集合

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

查询参数

type

Filter models by type. Use "all" to get all model types.

可用选项:
asr,
embedding,
image,
music,
text,
tts,
upscale,
inpaint,
video
示例:

"text"

响应

OK

data
object[]
必填

List of available models

object
enum<string>
必填
可用选项:
list
type
必填

Type of models returned.

可用选项:
asr,
embedding,
image,
music,
text,
tts,
upscale,
inpaint,
video
示例:

"text"