はじめに
Agent の接続
接続コンテキスト
接続手順をClaude Code、Codex、Cursorなどのコーディングエージェントに渡し、作りたいものを伝えてください。現在はREST APIとドキュメントを使って接続します。
Agent
Use the KusArt REST API for anime image and video generation.
Read https://kusart.com/llms.txt first. It lists every model with its exact task_type, version parameters, starting price and a link to its full parameter reference. Do not guess task_type values.
Kusa-Anima and Kusa-XL work best with English prompts; prompts in other languages are translated into English automatically. To control the wording, translate a non-English request into English yourself first (see "Prompt language" in llms.txt). With no translation model available, translate it yourself by the rules in that section. For Kusa-Anima images with several characters, follow "Multiple characters" in its reference file.
Send requests server-side with X-API-Key from KUSART_API_KEY in the environment. Keep the key out of chat and browser UI code.
Set a descriptive User-Agent header. Requests that use some default library user agents, such as Python urllib, are rejected with HTTP 403.
Every create request spends credits. Estimate the cost from the listed price before submitting. If the user has approved a budget that covers it, run it; otherwise confirm the output, inputs and cost with the user first. Never create a second task just to check progress.キーは自分の環境で設定してください。有料実行前に素材と料金を確認します。REST接続のためMCPは不要です。
全モデルの task_type・パラメータ・価格をプレーンテキストでまとめています。コーディングエージェントがそのまま読めます。 エージェント向けテキスト版(llms.txt)
リクエストの流れ
「APIキー」でAPIキーを作成し、ご自身のサーバーにKUSART_API_KEYを設定して、モデルのリクエストをコピーしてください。送信前にサンプル素材URLと画風IDを置き換えます。task_idを保存し、COMPLETED / FAILED / CANCELLEDになるまでポーリングしてください。進捗確認のためにタスクを再作成しないでください。本番環境のブラウザーコードにキーを埋め込まないでください。