모든 서버 도구
Image generation
openrouter:image_generation
모든 텍스트 모델이 이미지를 생성할 수 있게 합니다. 모델이 이미지 프롬프트를 작성하면 OpenRouter가 설정된 이미지 모델(기본값: openai/gpt-image-2.6-flare)로 이미지를 생성하고, 생성된 이미지는 응답과 함께 반환됩니다.
작동 방식
텍스트 전용 모델을 포함한 모든 모델의 응답에 이미지를 추가하는 데 사용합니다.
- 1
사용자의 모델 이미지가 도움이 된다고 판단하고 해당 이미지의 프롬프트를 작성합니다.
- 2
OpenRouter 설정된 이미지 모델로 생성하고 URL을 반환합니다.
- 3
사용자의 모델 응답에 이미지를 포함하며, 여러 이미지를 생성할 수 있습니다.
제공업체 및 가격
OpenRouter
이미지 모델 요금
도구가 호출하는 이미지 모델에 따라 요금이 책정되며, 이미지 출력을 지원하는 모든 모델을 선택할 수 있습니다.
모든 요청에 표준 모델 토큰 비용이 적용됩니다.
이 도구 사용
OpenRouter가 요청 중에 도구를 실행하고 결과를 모델에 반환하므로 클라이언트 측 도구 루프가 필요하지 않습니다.
지원 API: Chat Completions, Responses, and Anthropic Messages.
Shell
curl https://dynamicsinfo.com/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.2",
"tools": [
{
"type": "openrouter:image_generation"
}
],
"messages": [
{
"role": "user",
"content": "Draw a watercolor painting of a lighthouse at dusk."
}
]
}'설정, 매개변수 및 예제는 문서에서 확인할 수 있습니다.
통합 가이드 읽기자주 묻는 질문
Yes. Add the openrouter:image_generation tool to the request’s tools array. The model writes an image prompt when the conversation calls for one, OpenRouter generates the image with an image model, and the image comes back with the response. A model with text-only output, such as openai/gpt-5.2, can answer with images this way.
The tool uses openai/gpt-image-2.6-flare unless you set parameters.model on the tool entry. Any model with image output on OpenRouter can be selected, so switching image models changes one field and keeps the same API key and request shape. Other parameters such as quality, size and aspect_ratio pass through to that model.
Each image is billed at the selected image model’s price, on top of the token cost of the model that calls the tool. Each image model’s price is on its model page and in the image models collection.
With the Images API (POST /api/v1/images), your code writes the prompt and calls the image model directly. With the tool, the model decides when an image helps, writes the prompt itself and can create several images in one Chat Completions, Responses or Anthropic Messages request.