使用 OpenAI Response API 进行图像分析
POST /v1/responses{
"id": "resp-abc123",
"object": "response",
"created": 1699896916,
"model": "gpt-4o",
"output": "The image shows a wooden boardwalk path extending through a lush green grassland.",
"usage": {
"prompt_tokens": 3500,
"completion_tokens": 245,
"total_tokens": 3745
}
}| 参数 | 类型 | 必填 | 默认值 | 范围 | 描述 |
|---|---|---|---|---|---|
model | string | 是 | - | - | 用于生成响应的模型 ID,如 gpt-4o 或 o3。 |
input | string/array | 是 | - | - | 模型的输入内容。 |
input.role | string | 是 | - | user, assistant, system, developer | 消息输入的角色。 |
input.content | string/array | 是 | - | - | 字符串时为模型的文本输入;数组时为包含不同内容类型的一个或多个输入项列表。 |