ChatGPT 5.5 API
Img2Vid 在公开 chat 模型 API 中使用 openai/gpt-5.5 暴露 ChatGPT 5.5。
模型标识
| 字段 | 值 |
|---|---|
| Img2Vid 模型 key | openai/gpt-5.5 |
| 运行时模型 id | gpt-5.5 |
| Provider | OpenAI |
| 公开能力 | Reasoning、图片附件、工具调用 |
价格
| 单位 | Credits |
|---|---|
| Input | 每 1,000,000 tokens 10 credits |
| Output | 每 1,000,000 tokens 60 credits |
| Cached input | 每 1,000,000 tokens 1 credit |
模型参数
| 参数 | 类型 | 默认值 | 可选值 |
|---|---|---|---|
reasoning_effort |
string | medium |
none、low、medium、high、xhigh |
使用 reasoning: true 开启推理,并通过 options.reasoning_effort 传递推理强度。
OpenAI 兼容示例
curl https://img2vid.net/api/v1/chat/completions \
-H "Authorization: Bearer $BUBLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.5",
"messages": [
{
"role": "system",
"content": "You are a concise technical assistant."
},
{
"role": "user",
"content": "Summarize the tradeoffs in adopting this model for research and coding."
}
],
"reasoning": true,
"options": {
"reasoning_effort": "medium"
},
"max_completion_tokens": 800
}'
Anthropic Messages 兼容示例
curl https://img2vid.net/api/v1/messages \
-H "Authorization: Bearer $BUBLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.5",
"system": "You are a concise technical assistant.",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Summarize the tradeoffs in adopting this model for research and coding."
}
]
}
],
"thinking": true,
"options": {
"reasoning_effort": "medium"
},
"max_tokens": 800
}'
Gemini 兼容示例
curl https://img2vid.net/api/v1beta/models/openai/gpt-5.5:generateContent \
-H "Authorization: Bearer $BUBLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"systemInstruction": {
"parts": [
{
"text": "You are a concise technical assistant."
}
]
},
"contents": [
{
"role": "user",
"parts": [
{
"text": "Summarize the tradeoffs in adopting this model for research and coding."
}
]
}
],
"reasoning": true,
"options": {
"reasoning_effort": "medium"
},
"generationConfig": {
"maxOutputTokens": 800
}
}'
Gemini 兼容流式输出使用 /api/v1beta/models/openai/gpt-5.5:streamGenerateContent。
SDK 示例
下面的示例使用本页的 Img2Vid chat 模型 key,并通过 OpenAI 兼容 Chat Completions 调用。片段假设你已经按快速开始初始化了 SDK client,并引入了对应语言需要的 SDK 类型。Anthropic Messages 和 Gemini 兼容调用使用同一模型 key;Gemini 流式输出请使用 SDK 的 streamGenerateContent / stream_generate_content 方法。
JavaScript / TypeScript
const completion = await buble.chat.completions.create({
model: 'openai/gpt-5.5',
messages: [
{ role: 'system', content: 'You are a concise technical assistant.' },
{
role: 'user',
content:
'Summarize the tradeoffs in adopting this model for research and coding.',
},
],
reasoning: true,
options: {
reasoning_effort: 'medium',
},
max_completion_tokens: 800,
});
console.log(completion.choices?.[0]?.message?.content);
Python
completion = client.chat.completions.create(
model="openai/gpt-5.5",
messages=[
{"role": "system", "content": "You are a concise technical assistant."},
{"role": "user", "content": "Summarize the tradeoffs in adopting this model for research and coding."},
],
reasoning=True,
options={"reasoning_effort": "medium"},
max_completion_tokens=800,
)
print(completion["choices"][0]["message"]["content"])
Go
completion, err := client.Chat.Completions.Create(ctx, buble.ChatRequest{
"model": "openai/gpt-5.5",
"messages": []any{
map[string]any{"role": "system", "content": "You are a concise technical assistant."},
map[string]any{"role": "user", "content": "Summarize the tradeoffs in adopting this model for research and coding."},
},
"reasoning": true,
"options": map[string]any{"reasoning_effort": "medium"},
"max_completion_tokens": 800,
})
if err != nil {
return err
}
fmt.Println(completion)
Rust
let completion = client.chat().completions().create(serde_json::json!({
"model": "openai/gpt-5.5",
"messages": [
{ "role": "system", "content": "You are a concise technical assistant." },
{ "role": "user", "content": "Summarize the tradeoffs in adopting this model for research and coding." }
],
"reasoning": true,
"options": { "reasoning_effort": "medium" },
"max_completion_tokens": 800
})).await?;
Swift
let completion = try await client.chat.completions.create([
"model": "openai/gpt-5.5",
"messages": [
["role": "system", "content": "You are a concise technical assistant."],
["role": "user", "content": "Summarize the tradeoffs in adopting this model for research and coding."]
],
"reasoning": true,
"options": ["reasoning_effort": "medium"],
"max_completion_tokens": 800
])
Dart / Flutter
final completion = await client.chat.completions.create({
'model': 'openai/gpt-5.5',
'messages': [
{'role': 'system', 'content': 'You are a concise technical assistant.'},
{'role': 'user', 'content': 'Summarize the tradeoffs in adopting this model for research and coding.'},
],
'reasoning': true,
'options': {'reasoning_effort': 'medium'},
'max_completion_tokens': 800,
});
Elixir
{:ok, completion} =
Buble.Chat.Completions.create(client, %{
model: "openai/gpt-5.5",
messages: [
%{role: "system", content: "You are a concise technical assistant."},
%{role: "user", content: "Summarize the tradeoffs in adopting this model for research and coding."}
],
reasoning: true,
options: %{reasoning_effort: "medium"},
max_completion_tokens: 800
})
Java
var completion = client.chat().completions().create(Map.of(
"model", "openai/gpt-5.5",
"messages", List.of(
Map.of("role", "system", "content", "You are a concise technical assistant."),
Map.of("role", "user", "content", "Summarize the tradeoffs in adopting this model for research and coding.")),
"reasoning", true,
"options", Map.of("reasoning_effort", "medium"),
"max_completion_tokens", 800));
.NET
var completion = await client.Chat.Completions.CreateAsync(new Dictionary<string, object?>
{
["model"] = "openai/gpt-5.5",
["messages"] = new[]
{
new Dictionary<string, object?> { ["role"] = "system", ["content"] = "You are a concise technical assistant." },
new Dictionary<string, object?> { ["role"] = "user", ["content"] = "Summarize the tradeoffs in adopting this model for research and coding." }
},
["reasoning"] = true,
["options"] = new Dictionary<string, object?>
{
["reasoning_effort"] = "medium"
},
["max_completion_tokens"] = 800
});
PHP
$completion = $client->chat()->completions()->create([
'model' => 'openai/gpt-5.5',
'messages' => [
['role' => 'system', 'content' => 'You are a concise technical assistant.'],
['role' => 'user', 'content' => 'Summarize the tradeoffs in adopting this model for research and coding.'],
],
'reasoning' => true,
'options' => [
'reasoning_effort' => 'medium',
],
'max_completion_tokens' => 800,
]);
Ruby
completion = client.chat.completions.create(
model: "openai/gpt-5.5",
messages: [
{ role: "system", content: "You are a concise technical assistant." },
{ role: "user", content: "Summarize the tradeoffs in adopting this model for research and coding." }
],
reasoning: true,
options: {reasoning_effort: "medium"},
max_completion_tokens: 800
)