Skip to content

feat: add Requesty Image Generation node - #5

Merged
Thibaultjaigu merged 8 commits into
mainfrom
feat/support-image-generation
Jun 10, 2026
Merged

feat: add Requesty Image Generation node#5
Thibaultjaigu merged 8 commits into
mainfrom
feat/support-image-generation

Conversation

@Thibaultjaigu

@Thibaultjaigu Thibaultjaigu commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a second node to the package: Requesty Image Generation, calling Requesty's OpenAI-compatible POST /v1/images/generations endpoint. The existing chat model node is unchanged in behavior.

  • New ImageGenRequesty node: text prompt -> image, with model, size, quality, background, output format, and number-of-images options
  • Binary output by default (preview in the n8n output panel, works with downstream binary nodes); Return Image URLs option for JSON output
  • Usable as an AI Agent tool (usableAsTool) - the agent fills the prompt via $fromAI(); requires N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
  • Uses httpRequestWithAuthentication with the existing requestyApi credential (no credential changes needed by users)
  • Extracted shared attribution-header merging into nodes/shared/headers.ts, reused by both nodes
  • Fix: credential authenticate() now only sets HTTP-Referer/X-Title when absent, so node-level custom headers can override them as documented
  • Unit tests (33 passing), README docs, and a manual test workflow (test-workflow-image.json)
  • Version bump to 1.1.0

Testing

  • npm run lint, npm test, npm run build all clean
  • Manually verified all three paths against the production gateway: binary generation, URL mode, and agent-tool usage (end-to-end run with gpt-5.4 calling the image tool)

@Thibaultjaigu
Thibaultjaigu merged commit 871e79b into main Jun 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant