https://image.pollinations.ai/prompt flux 공공 공유 서버이므로 혼잡 시 지연이 발생할 수 있습니다
curl https://image.pollinations.ai/prompt/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-arbitrary-free" \
-d '{
"model": "flux",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}' from openai import OpenAI
client = OpenAI(
base_url="https://image.pollinations.ai/prompt",
api_key="sk-arbitrary-free"
)
response = client.chat.completions.create(
model="flux",
messages=[{"role": "user", "content": "Hello!"}],
stream=True
)
for chunk in response:
content = chunk.choices[0].delta.content or ""
print(content, end="", flush=True) import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://image.pollinations.ai/prompt",
apiKey: "sk-arbitrary-free"
});
const stream = await client.chat.completions.create({
model: "flux",
messages: [{ role: "user", content: "Hello!" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
} {
"apiProvider": "openai",
"openAiBaseUrl": "https://image.pollinations.ai/prompt",
"openAiApiKey": "sk-arbitrary-free",
"openAiModelId": "flux"
}