Documentation Index
Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt
Use this file to discover all available pages before exploring further.
公式の能力境界
- Anthropic のパブリック API は専用のイメージ生成エンドポイントを公開していません
- クロードは直接イメージを作成するのではなく、イメージを理解するのが得意です
推奨されるワークフロー
- クロード /v1/messages を使用してプロンプトを調整します
- イメージ生成を正式にサポートするプロバイダーに最終プロンプトを渡します。
- レビュー、QA、または改訂の指示のために再度 Claude を使用します
cURLの例
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-20250514",
"max_tokens": 512,
"messages": [
{
"role": "user",
"content": [{ "type": "text", "text": "Rewrite this prompt for a clean ApiGo product poster: A clean ApiGo product poster" }]
}
]
}'
Python の例
from anthropic import Anthropic
client = Anthropic(api_key="<ANTHROPIC_API_KEY>")
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=512,
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Rewrite this prompt for a clean ApiGo product poster: A clean ApiGo product poster",
}
],
}
],
)
print(response.content[0].text)
Node.js の例
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const response = await client.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 512,
messages: [
{
role: "user",
content: [
{
type: "text",
text: "Rewrite this prompt for a clean ApiGo product poster: A clean ApiGo product poster"
}
]
}
]
});
console.log(response.content[0].text);
ベストプラクティス
- フロントエンド用に偽の「クロード イメージ生成」エンドポイントを作成しないでください。
- 直接レンダリングの代わりにクロードを使用して迅速な調整とレビューを行う
- 生成パイプラインと理解パイプラインを分離しておきます