Cookieを使用しています. Cookieとブラウザストレージは、ログイン状態の維持と設定の保存に使われます。許可いただいた場合は、サイトの利用状況も計測します。はいつでも変更できます。詳しくはCookieポリシーをご覧ください。
- 必須セッション、セキュリティ、設定。サイトの動作に必要です。常にオン
Cookieを使用しています. Cookieとブラウザストレージは、ログイン状態の維持と設定の保存に使われます。許可いただいた場合は、サイトの利用状況も計測します。はいつでも変更できます。詳しくはCookieポリシーをご覧ください。
baidu/ernie-5.5-flash-preview:free上記の料金で残高から差し引かれます。
設定
ERNIE-5.5-Flash-Preview は Baidu のテキスト基盤モデルで、ERNIE ファミリーの一部です。これはその系列における最新の基盤モデルであり、コーディング、エージェント機能、ナレッジワーク、ディープリサーチにわたる改善が含まれています。このモデルは総パラメータ数 2800 億として記載されています。api14 では、モデル id baidu/ernie-5.5-flash-preview:free で無料バリアントとして利用できます。
このモデルはテキスト入力を受け取りテキスト出力を生成するため、マルチモーダルではなく汎用言語モデルとして機能します。コンテキストウィンドウは 1,024,000 トークンで、最大出力は 921,600 トークンです。非常に大きな入力ウィンドウと非常に大きな出力許容量のこの組み合わせにより、長い文書、コードベース、文字起こしを 1 回のリクエストで送信しても、なお実質的な応答を受け取ることができます。推論はこのモデルの機能セットの一部です。サポートされるパラメータには include_reasoning、reasoning、reasoning_effort が含まれ、モデルが推論を行うかどうか、またその量を制御できます。
記載されている強みは、いくつかの実用的な用途を示しています。コーディング作業は自然に適合します。コードの生成、レビュー、または全体を読み込む必要がある大規模リポジトリの処理であっても同様です。エージェント機能により、モデルがどの関数を呼び出すかを決定し、ステップを連鎖させるツール呼び出しワークフローの候補となります。ナレッジワークは、起草、要約、長い文書の変換をカバーします。ディープリサーチは、多くの情報源や大量のテキストをまとめ、回答する前にそれについて推論する必要があるタスクに適しています。大きなコンテキストウィンドウがあることで、これらのタスクの文書重視およびリポジトリ重視のバージョンを 1 回のパスで実行できるようになります。
このモデルは、モデル id baidu/ernie-5.5-flash-preview:free を使用して api14 の OpenAI 互換 API を通じて呼び出します。インターフェースは OpenAI 形式に従っているため、既存の OpenAI クライアントライブラリとリクエスト形状は、ベース URL とモデル id を変更するだけで動作します。サポートされるリクエストパラメータは include_reasoning、max_tokens、reasoning、reasoning_effort、response_format、structured_outputs、temperature、tool_choice、tools、top_p です。構造化出力と response_format は、返信をスキーマに準拠させる必要がある場合に便利であり、tools と tool_choice は関数呼び出しをカバーします。temperature と top_p はサンプリングを制御し、max_tokens は生成長を上限設定します。
タスクが推論制御、ツール呼び出し、またはこの規模のコンテキストウィンドウを必要としない場合、より小さく単純なテキストモデルの方が適しており、実行コストも安くなる可能性があります。このモデルはテキスト専用であるため、画像、音声、その他の入力タイプを含むものは、このモデルが受け入れる範囲外です。またこれはプレビューリリースであり、本番環境のモデルに長期的な安定性を求める場合は検討する価値があります。
カタログデータをもとにAIモデルが作成し、自動翻訳した文章です。表の価格と上限はカタログから直接取得しています。 コンテンツの作り方
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "baidu/ernie-5.5-flash-preview:free",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api14.com/api/v1",
api_key=os.environ["API14_API_KEY"],
)
result = client.chat.completions.create(
model="baidu/ernie-5.5-flash-preview:free",
messages=[
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
],
)
print(result.choices[0].message.content)
curl https://api14.com/api/v1/chat/completions \
-H "Authorization: Bearer $API14_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "baidu/ernie-5.5-flash-preview:free",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
}'
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"model": "baidu/ernie-5.5-flash-preview:free",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
}`)
req, _ := http.NewRequest("POST", "https://api14.com/api/v1/chat/completions", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("API14_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}
<?php
$ch = curl_init("https://api14.com/api/v1/chat/completions");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("API14_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"model" => "baidu/ernie-5.5-flash-preview:free",
"messages" => [
[
"role" => "user",
"content" => "Explain vector databases in two sentences."
]
]
]),
]);
$response = json_decode(curl_exec($ch), true);
print_r($response);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"model": "baidu/ernie-5.5-flash-preview:free",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api14.com/api/v1/chat/completions"))
.header("Authorization", "Bearer " + System.getenv("API14_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
using OpenAI;
using OpenAI.Chat;
using System.ClientModel;
var client = new ChatClient(
model: "baidu/ernie-5.5-flash-preview:free",
credential: new ApiKeyCredential(Environment.GetEnvironmentVariable("API14_API_KEY")!),
options: new OpenAIClientOptions { Endpoint = new Uri("https://api14.com/api/v1") });
ChatCompletion completion = client.CompleteChat("Explain vector databases in two sentences.");
Console.WriteLine(completion.Content[0].Text);
require "net/http"
require "json"
uri = URI("https://api14.com/api/v1/chat/completions")
req = Net::HTTP::Post.new(uri, {
"Authorization" => "Bearer #{ENV["API14_API_KEY"]}",
"Content-Type" => "application/json",
})
req.body = {
"model": "baidu/ernie-5.5-flash-preview:free",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
puts JSON.parse(res.body)
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let key = std::env::var("API14_API_KEY")?;
let res = reqwest::Client::new()
.post("https://api14.com/api/v1/chat/completions")
.bearer_auth(key)
.json(&json!({
"model": "baidu/ernie-5.5-flash-preview:free",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
}))
.send()
.await?
.text()
.await?;
println!("{res}");
Ok(())
}
include_reasoningmax_tokensreasoningreasoning_effortresponse_formatstructured_outputstemperaturetool_choicetoolstop_pこのコミュニティにはまだトピックがありません。Baidu: ERNIE-5.5-Flash-Preview (free)について最初のトピックを立てましょう。