intentkit 0.5.0__py3-none-any.whl → 0.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +17 -0
- intentkit/abstracts/__init__.py +0 -0
- intentkit/abstracts/agent.py +60 -0
- intentkit/abstracts/api.py +4 -0
- intentkit/abstracts/engine.py +38 -0
- intentkit/abstracts/exception.py +9 -0
- intentkit/abstracts/graph.py +25 -0
- intentkit/abstracts/skill.py +129 -0
- intentkit/abstracts/twitter.py +54 -0
- intentkit/clients/__init__.py +14 -0
- intentkit/clients/cdp.py +53 -0
- intentkit/clients/twitter.py +445 -0
- intentkit/config/__init__.py +0 -0
- intentkit/config/config.py +164 -0
- intentkit/core/__init__.py +0 -0
- intentkit/core/agent.py +191 -0
- intentkit/core/api.py +40 -0
- intentkit/core/client.py +45 -0
- intentkit/core/credit.py +1767 -0
- intentkit/core/engine.py +1018 -0
- intentkit/core/node.py +223 -0
- intentkit/core/prompt.py +58 -0
- intentkit/core/skill.py +124 -0
- intentkit/models/agent.py +1689 -0
- intentkit/models/agent_data.py +810 -0
- intentkit/models/agent_schema.json +733 -0
- intentkit/models/app_setting.py +156 -0
- intentkit/models/base.py +9 -0
- intentkit/models/chat.py +581 -0
- intentkit/models/conversation.py +286 -0
- intentkit/models/credit.py +1406 -0
- intentkit/models/db.py +120 -0
- intentkit/models/db_mig.py +102 -0
- intentkit/models/generator.py +347 -0
- intentkit/models/llm.py +746 -0
- intentkit/models/redis.py +132 -0
- intentkit/models/skill.py +466 -0
- intentkit/models/user.py +243 -0
- intentkit/skills/__init__.py +12 -0
- intentkit/skills/acolyt/__init__.py +83 -0
- intentkit/skills/acolyt/acolyt.jpg +0 -0
- intentkit/skills/acolyt/ask.py +128 -0
- intentkit/skills/acolyt/base.py +28 -0
- intentkit/skills/acolyt/schema.json +89 -0
- intentkit/skills/aixbt/README.md +71 -0
- intentkit/skills/aixbt/__init__.py +73 -0
- intentkit/skills/aixbt/aixbt.jpg +0 -0
- intentkit/skills/aixbt/base.py +21 -0
- intentkit/skills/aixbt/projects.py +153 -0
- intentkit/skills/aixbt/schema.json +99 -0
- intentkit/skills/allora/__init__.py +83 -0
- intentkit/skills/allora/allora.jpeg +0 -0
- intentkit/skills/allora/base.py +28 -0
- intentkit/skills/allora/price.py +130 -0
- intentkit/skills/allora/schema.json +89 -0
- intentkit/skills/base.py +174 -0
- intentkit/skills/carv/README.md +95 -0
- intentkit/skills/carv/__init__.py +121 -0
- intentkit/skills/carv/base.py +183 -0
- intentkit/skills/carv/carv.webp +0 -0
- intentkit/skills/carv/fetch_news.py +92 -0
- intentkit/skills/carv/onchain_query.py +164 -0
- intentkit/skills/carv/schema.json +137 -0
- intentkit/skills/carv/token_info_and_price.py +110 -0
- intentkit/skills/cdp/__init__.py +137 -0
- intentkit/skills/cdp/base.py +21 -0
- intentkit/skills/cdp/cdp.png +0 -0
- intentkit/skills/cdp/get_balance.py +81 -0
- intentkit/skills/cdp/schema.json +473 -0
- intentkit/skills/chainlist/README.md +38 -0
- intentkit/skills/chainlist/__init__.py +54 -0
- intentkit/skills/chainlist/base.py +21 -0
- intentkit/skills/chainlist/chain_lookup.py +208 -0
- intentkit/skills/chainlist/chainlist.png +0 -0
- intentkit/skills/chainlist/schema.json +47 -0
- intentkit/skills/common/__init__.py +82 -0
- intentkit/skills/common/base.py +21 -0
- intentkit/skills/common/common.jpg +0 -0
- intentkit/skills/common/current_time.py +84 -0
- intentkit/skills/common/schema.json +57 -0
- intentkit/skills/cookiefun/README.md +121 -0
- intentkit/skills/cookiefun/__init__.py +78 -0
- intentkit/skills/cookiefun/base.py +41 -0
- intentkit/skills/cookiefun/constants.py +18 -0
- intentkit/skills/cookiefun/cookiefun.png +0 -0
- intentkit/skills/cookiefun/get_account_details.py +171 -0
- intentkit/skills/cookiefun/get_account_feed.py +282 -0
- intentkit/skills/cookiefun/get_account_smart_followers.py +181 -0
- intentkit/skills/cookiefun/get_sectors.py +128 -0
- intentkit/skills/cookiefun/schema.json +155 -0
- intentkit/skills/cookiefun/search_accounts.py +225 -0
- intentkit/skills/cryptocompare/__init__.py +130 -0
- intentkit/skills/cryptocompare/api.py +159 -0
- intentkit/skills/cryptocompare/base.py +303 -0
- intentkit/skills/cryptocompare/cryptocompare.png +0 -0
- intentkit/skills/cryptocompare/fetch_news.py +96 -0
- intentkit/skills/cryptocompare/fetch_price.py +99 -0
- intentkit/skills/cryptocompare/fetch_top_exchanges.py +113 -0
- intentkit/skills/cryptocompare/fetch_top_market_cap.py +109 -0
- intentkit/skills/cryptocompare/fetch_top_volume.py +108 -0
- intentkit/skills/cryptocompare/fetch_trading_signals.py +107 -0
- intentkit/skills/cryptocompare/schema.json +168 -0
- intentkit/skills/cryptopanic/__init__.py +108 -0
- intentkit/skills/cryptopanic/base.py +51 -0
- intentkit/skills/cryptopanic/cryptopanic.png +0 -0
- intentkit/skills/cryptopanic/fetch_crypto_news.py +153 -0
- intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +136 -0
- intentkit/skills/cryptopanic/schema.json +103 -0
- intentkit/skills/dapplooker/README.md +92 -0
- intentkit/skills/dapplooker/__init__.py +83 -0
- intentkit/skills/dapplooker/base.py +26 -0
- intentkit/skills/dapplooker/dapplooker.jpg +0 -0
- intentkit/skills/dapplooker/dapplooker_token_data.py +476 -0
- intentkit/skills/dapplooker/schema.json +91 -0
- intentkit/skills/defillama/__init__.py +323 -0
- intentkit/skills/defillama/api.py +315 -0
- intentkit/skills/defillama/base.py +135 -0
- intentkit/skills/defillama/coins/__init__.py +0 -0
- intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +116 -0
- intentkit/skills/defillama/coins/fetch_block.py +98 -0
- intentkit/skills/defillama/coins/fetch_current_prices.py +105 -0
- intentkit/skills/defillama/coins/fetch_first_price.py +100 -0
- intentkit/skills/defillama/coins/fetch_historical_prices.py +110 -0
- intentkit/skills/defillama/coins/fetch_price_chart.py +109 -0
- intentkit/skills/defillama/coins/fetch_price_percentage.py +93 -0
- intentkit/skills/defillama/config/__init__.py +0 -0
- intentkit/skills/defillama/config/chains.py +433 -0
- intentkit/skills/defillama/defillama.jpeg +0 -0
- intentkit/skills/defillama/fees/__init__.py +0 -0
- intentkit/skills/defillama/fees/fetch_fees_overview.py +130 -0
- intentkit/skills/defillama/schema.json +383 -0
- intentkit/skills/defillama/stablecoins/__init__.py +0 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +100 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +129 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +83 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +126 -0
- intentkit/skills/defillama/tests/__init__.py +0 -0
- intentkit/skills/defillama/tests/api_integration.test.py +192 -0
- intentkit/skills/defillama/tests/api_unit.test.py +583 -0
- intentkit/skills/defillama/tvl/__init__.py +0 -0
- intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +106 -0
- intentkit/skills/defillama/tvl/fetch_chains.py +107 -0
- intentkit/skills/defillama/tvl/fetch_historical_tvl.py +91 -0
- intentkit/skills/defillama/tvl/fetch_protocol.py +207 -0
- intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +93 -0
- intentkit/skills/defillama/tvl/fetch_protocols.py +196 -0
- intentkit/skills/defillama/volumes/__init__.py +0 -0
- intentkit/skills/defillama/volumes/fetch_dex_overview.py +157 -0
- intentkit/skills/defillama/volumes/fetch_dex_summary.py +123 -0
- intentkit/skills/defillama/volumes/fetch_options_overview.py +131 -0
- intentkit/skills/defillama/yields/__init__.py +0 -0
- intentkit/skills/defillama/yields/fetch_pool_chart.py +100 -0
- intentkit/skills/defillama/yields/fetch_pools.py +126 -0
- intentkit/skills/dexscreener/__init__.py +93 -0
- intentkit/skills/dexscreener/base.py +133 -0
- intentkit/skills/dexscreener/dexscreener.png +0 -0
- intentkit/skills/dexscreener/model/__init__.py +0 -0
- intentkit/skills/dexscreener/model/search_token_response.py +82 -0
- intentkit/skills/dexscreener/schema.json +48 -0
- intentkit/skills/dexscreener/search_token.py +321 -0
- intentkit/skills/dune_analytics/__init__.py +103 -0
- intentkit/skills/dune_analytics/base.py +46 -0
- intentkit/skills/dune_analytics/dune.png +0 -0
- intentkit/skills/dune_analytics/fetch_kol_buys.py +128 -0
- intentkit/skills/dune_analytics/fetch_nation_metrics.py +237 -0
- intentkit/skills/dune_analytics/schema.json +99 -0
- intentkit/skills/elfa/README.md +100 -0
- intentkit/skills/elfa/__init__.py +123 -0
- intentkit/skills/elfa/base.py +28 -0
- intentkit/skills/elfa/elfa.jpg +0 -0
- intentkit/skills/elfa/mention.py +504 -0
- intentkit/skills/elfa/schema.json +153 -0
- intentkit/skills/elfa/stats.py +118 -0
- intentkit/skills/elfa/tokens.py +126 -0
- intentkit/skills/enso/README.md +75 -0
- intentkit/skills/enso/__init__.py +114 -0
- intentkit/skills/enso/abi/__init__.py +0 -0
- intentkit/skills/enso/abi/approval.py +279 -0
- intentkit/skills/enso/abi/erc20.py +14 -0
- intentkit/skills/enso/abi/route.py +129 -0
- intentkit/skills/enso/base.py +44 -0
- intentkit/skills/enso/best_yield.py +286 -0
- intentkit/skills/enso/enso.jpg +0 -0
- intentkit/skills/enso/networks.py +105 -0
- intentkit/skills/enso/prices.py +93 -0
- intentkit/skills/enso/route.py +300 -0
- intentkit/skills/enso/schema.json +212 -0
- intentkit/skills/enso/tokens.py +223 -0
- intentkit/skills/enso/wallet.py +381 -0
- intentkit/skills/github/README.md +63 -0
- intentkit/skills/github/__init__.py +54 -0
- intentkit/skills/github/base.py +21 -0
- intentkit/skills/github/github.jpg +0 -0
- intentkit/skills/github/github_search.py +183 -0
- intentkit/skills/github/schema.json +59 -0
- intentkit/skills/heurist/__init__.py +143 -0
- intentkit/skills/heurist/base.py +26 -0
- intentkit/skills/heurist/heurist.png +0 -0
- intentkit/skills/heurist/image_generation_animagine_xl.py +162 -0
- intentkit/skills/heurist/image_generation_arthemy_comics.py +162 -0
- intentkit/skills/heurist/image_generation_arthemy_real.py +162 -0
- intentkit/skills/heurist/image_generation_braindance.py +162 -0
- intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +162 -0
- intentkit/skills/heurist/image_generation_flux_1_dev.py +162 -0
- intentkit/skills/heurist/image_generation_sdxl.py +161 -0
- intentkit/skills/heurist/schema.json +196 -0
- intentkit/skills/lifi/README.md +294 -0
- intentkit/skills/lifi/__init__.py +141 -0
- intentkit/skills/lifi/base.py +21 -0
- intentkit/skills/lifi/lifi.png +0 -0
- intentkit/skills/lifi/schema.json +89 -0
- intentkit/skills/lifi/token_execute.py +472 -0
- intentkit/skills/lifi/token_quote.py +190 -0
- intentkit/skills/lifi/utils.py +656 -0
- intentkit/skills/moralis/README.md +490 -0
- intentkit/skills/moralis/__init__.py +110 -0
- intentkit/skills/moralis/api.py +281 -0
- intentkit/skills/moralis/base.py +55 -0
- intentkit/skills/moralis/fetch_chain_portfolio.py +191 -0
- intentkit/skills/moralis/fetch_nft_portfolio.py +284 -0
- intentkit/skills/moralis/fetch_solana_portfolio.py +331 -0
- intentkit/skills/moralis/fetch_wallet_portfolio.py +301 -0
- intentkit/skills/moralis/moralis.png +0 -0
- intentkit/skills/moralis/schema.json +156 -0
- intentkit/skills/moralis/tests/__init__.py +0 -0
- intentkit/skills/moralis/tests/test_wallet.py +511 -0
- intentkit/skills/nation/__init__.py +62 -0
- intentkit/skills/nation/base.py +31 -0
- intentkit/skills/nation/nation.png +0 -0
- intentkit/skills/nation/nft_check.py +106 -0
- intentkit/skills/nation/schema.json +58 -0
- intentkit/skills/openai/__init__.py +107 -0
- intentkit/skills/openai/base.py +32 -0
- intentkit/skills/openai/dalle_image_generation.py +128 -0
- intentkit/skills/openai/gpt_image_generation.py +152 -0
- intentkit/skills/openai/gpt_image_to_image.py +186 -0
- intentkit/skills/openai/image_to_text.py +126 -0
- intentkit/skills/openai/openai.png +0 -0
- intentkit/skills/openai/schema.json +139 -0
- intentkit/skills/portfolio/README.md +55 -0
- intentkit/skills/portfolio/__init__.py +151 -0
- intentkit/skills/portfolio/base.py +107 -0
- intentkit/skills/portfolio/constants.py +9 -0
- intentkit/skills/portfolio/moralis.png +0 -0
- intentkit/skills/portfolio/schema.json +237 -0
- intentkit/skills/portfolio/token_balances.py +155 -0
- intentkit/skills/portfolio/wallet_approvals.py +102 -0
- intentkit/skills/portfolio/wallet_defi_positions.py +80 -0
- intentkit/skills/portfolio/wallet_history.py +155 -0
- intentkit/skills/portfolio/wallet_net_worth.py +112 -0
- intentkit/skills/portfolio/wallet_nfts.py +139 -0
- intentkit/skills/portfolio/wallet_profitability.py +101 -0
- intentkit/skills/portfolio/wallet_profitability_summary.py +91 -0
- intentkit/skills/portfolio/wallet_stats.py +79 -0
- intentkit/skills/portfolio/wallet_swaps.py +147 -0
- intentkit/skills/skills.toml +103 -0
- intentkit/skills/slack/__init__.py +98 -0
- intentkit/skills/slack/base.py +55 -0
- intentkit/skills/slack/get_channel.py +109 -0
- intentkit/skills/slack/get_message.py +136 -0
- intentkit/skills/slack/schedule_message.py +92 -0
- intentkit/skills/slack/schema.json +135 -0
- intentkit/skills/slack/send_message.py +81 -0
- intentkit/skills/slack/slack.jpg +0 -0
- intentkit/skills/system/__init__.py +90 -0
- intentkit/skills/system/base.py +22 -0
- intentkit/skills/system/read_agent_api_key.py +87 -0
- intentkit/skills/system/regenerate_agent_api_key.py +77 -0
- intentkit/skills/system/schema.json +53 -0
- intentkit/skills/system/system.svg +76 -0
- intentkit/skills/tavily/README.md +86 -0
- intentkit/skills/tavily/__init__.py +91 -0
- intentkit/skills/tavily/base.py +27 -0
- intentkit/skills/tavily/schema.json +119 -0
- intentkit/skills/tavily/tavily.jpg +0 -0
- intentkit/skills/tavily/tavily_extract.py +147 -0
- intentkit/skills/tavily/tavily_search.py +139 -0
- intentkit/skills/token/README.md +89 -0
- intentkit/skills/token/__init__.py +107 -0
- intentkit/skills/token/base.py +154 -0
- intentkit/skills/token/constants.py +9 -0
- intentkit/skills/token/erc20_transfers.py +145 -0
- intentkit/skills/token/moralis.png +0 -0
- intentkit/skills/token/schema.json +141 -0
- intentkit/skills/token/token_analytics.py +81 -0
- intentkit/skills/token/token_price.py +132 -0
- intentkit/skills/token/token_search.py +121 -0
- intentkit/skills/twitter/__init__.py +146 -0
- intentkit/skills/twitter/base.py +68 -0
- intentkit/skills/twitter/follow_user.py +69 -0
- intentkit/skills/twitter/get_mentions.py +124 -0
- intentkit/skills/twitter/get_timeline.py +111 -0
- intentkit/skills/twitter/get_user_by_username.py +84 -0
- intentkit/skills/twitter/get_user_tweets.py +123 -0
- intentkit/skills/twitter/like_tweet.py +65 -0
- intentkit/skills/twitter/post_tweet.py +90 -0
- intentkit/skills/twitter/reply_tweet.py +98 -0
- intentkit/skills/twitter/retweet.py +76 -0
- intentkit/skills/twitter/schema.json +258 -0
- intentkit/skills/twitter/search_tweets.py +115 -0
- intentkit/skills/twitter/twitter.png +0 -0
- intentkit/skills/unrealspeech/__init__.py +55 -0
- intentkit/skills/unrealspeech/base.py +21 -0
- intentkit/skills/unrealspeech/schema.json +100 -0
- intentkit/skills/unrealspeech/text_to_speech.py +177 -0
- intentkit/skills/unrealspeech/unrealspeech.jpg +0 -0
- intentkit/skills/venice_audio/__init__.py +106 -0
- intentkit/skills/venice_audio/base.py +119 -0
- intentkit/skills/venice_audio/input.py +41 -0
- intentkit/skills/venice_audio/schema.json +152 -0
- intentkit/skills/venice_audio/venice_audio.py +240 -0
- intentkit/skills/venice_audio/venice_logo.jpg +0 -0
- intentkit/skills/venice_image/README.md +119 -0
- intentkit/skills/venice_image/__init__.py +154 -0
- intentkit/skills/venice_image/api.py +138 -0
- intentkit/skills/venice_image/base.py +188 -0
- intentkit/skills/venice_image/config.py +35 -0
- intentkit/skills/venice_image/image_enhance/README.md +119 -0
- intentkit/skills/venice_image/image_enhance/__init__.py +0 -0
- intentkit/skills/venice_image/image_enhance/image_enhance.py +80 -0
- intentkit/skills/venice_image/image_enhance/image_enhance_base.py +23 -0
- intentkit/skills/venice_image/image_enhance/image_enhance_input.py +40 -0
- intentkit/skills/venice_image/image_generation/README.md +144 -0
- intentkit/skills/venice_image/image_generation/__init__.py +0 -0
- intentkit/skills/venice_image/image_generation/image_generation_base.py +117 -0
- intentkit/skills/venice_image/image_generation/image_generation_fluently_xl.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_flux_dev.py +27 -0
- intentkit/skills/venice_image/image_generation/image_generation_flux_dev_uncensored.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_input.py +158 -0
- intentkit/skills/venice_image/image_generation/image_generation_lustify_sdxl.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_pony_realism.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +28 -0
- intentkit/skills/venice_image/image_generation/image_generation_venice_sd35.py +28 -0
- intentkit/skills/venice_image/image_upscale/README.md +111 -0
- intentkit/skills/venice_image/image_upscale/__init__.py +0 -0
- intentkit/skills/venice_image/image_upscale/image_upscale.py +90 -0
- intentkit/skills/venice_image/image_upscale/image_upscale_base.py +23 -0
- intentkit/skills/venice_image/image_upscale/image_upscale_input.py +22 -0
- intentkit/skills/venice_image/image_vision/README.md +112 -0
- intentkit/skills/venice_image/image_vision/__init__.py +0 -0
- intentkit/skills/venice_image/image_vision/image_vision.py +100 -0
- intentkit/skills/venice_image/image_vision/image_vision_base.py +17 -0
- intentkit/skills/venice_image/image_vision/image_vision_input.py +9 -0
- intentkit/skills/venice_image/schema.json +267 -0
- intentkit/skills/venice_image/utils.py +78 -0
- intentkit/skills/venice_image/venice_image.jpg +0 -0
- intentkit/skills/web_scraper/README.md +82 -0
- intentkit/skills/web_scraper/__init__.py +92 -0
- intentkit/skills/web_scraper/base.py +21 -0
- intentkit/skills/web_scraper/langchain.png +0 -0
- intentkit/skills/web_scraper/schema.json +115 -0
- intentkit/skills/web_scraper/scrape_and_index.py +327 -0
- intentkit/utils/__init__.py +1 -0
- intentkit/utils/chain.py +436 -0
- intentkit/utils/error.py +134 -0
- intentkit/utils/logging.py +70 -0
- intentkit/utils/middleware.py +61 -0
- intentkit/utils/random.py +16 -0
- intentkit/utils/s3.py +267 -0
- intentkit/utils/slack_alert.py +79 -0
- intentkit/utils/tx.py +37 -0
- {intentkit-0.5.0.dist-info → intentkit-0.5.2.dist-info}/METADATA +1 -1
- intentkit-0.5.2.dist-info/RECORD +365 -0
- intentkit-0.5.0.dist-info/RECORD +0 -4
- {intentkit-0.5.0.dist-info → intentkit-0.5.2.dist-info}/WHEEL +0 -0
- {intentkit-0.5.0.dist-info → intentkit-0.5.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Any, Dict, Optional, Tuple
|
|
3
|
+
|
|
4
|
+
from pydantic import Field
|
|
5
|
+
|
|
6
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
7
|
+
from intentkit.skills.base import (
|
|
8
|
+
IntentKitSkill,
|
|
9
|
+
SkillContext,
|
|
10
|
+
ToolException,
|
|
11
|
+
)
|
|
12
|
+
from intentkit.skills.venice_image.api import (
|
|
13
|
+
make_venice_api_request,
|
|
14
|
+
)
|
|
15
|
+
from intentkit.skills.venice_image.config import VeniceImageConfig
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
venice_base_url = "https://api.venice.ai" # Common base URL for all Venice endpoints
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class VeniceImageBaseTool(IntentKitSkill):
|
|
23
|
+
"""
|
|
24
|
+
Base class for all Venice AI image-related skills.
|
|
25
|
+
|
|
26
|
+
This class provides common functionality for interacting with the
|
|
27
|
+
Venice AI API, including:
|
|
28
|
+
|
|
29
|
+
- Retrieving the API key (from agent or system configuration).
|
|
30
|
+
- Applying rate limits to prevent overuse of the API.
|
|
31
|
+
- A standardized `post` method for making API requests.
|
|
32
|
+
|
|
33
|
+
Subclasses should inherit from this class and implement their specific
|
|
34
|
+
API interactions (e.g., image generation, upscaling, inpainting)
|
|
35
|
+
by defining their own `_arun` methods and setting appropriate `name`
|
|
36
|
+
and `description` attributes.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def category(self) -> str:
|
|
41
|
+
"""
|
|
42
|
+
Returns the category of this skill, used for configuration and logging.
|
|
43
|
+
"""
|
|
44
|
+
return "venice_image"
|
|
45
|
+
|
|
46
|
+
skill_store: SkillStoreABC = Field(
|
|
47
|
+
description="The skill store for persisting data and configs."
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
def getSkillConfig(self, context: SkillContext) -> VeniceImageConfig:
|
|
51
|
+
"""
|
|
52
|
+
Creates a VeniceImageConfig instance from a dictionary of configuration values.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
config: A dictionary containing configuration settings.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
A VeniceImageConfig object.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
return VeniceImageConfig(
|
|
62
|
+
api_key_provider=context.config.get("api_key_provider", "agent_owner"),
|
|
63
|
+
safe_mode=context.config.get("safe_mode", True),
|
|
64
|
+
hide_watermark=context.config.get("hide_watermark", True),
|
|
65
|
+
embed_exif_metadata=context.config.get("embed_exif_metadata", False),
|
|
66
|
+
negative_prompt=context.config.get(
|
|
67
|
+
"negative_prompt", "(worst quality: 1.4), bad quality, nsfw"
|
|
68
|
+
),
|
|
69
|
+
rate_limit_number=context.config.get("rate_limit_number"),
|
|
70
|
+
rate_limit_minutes=context.config.get("rate_limit_minutes"),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
def get_api_key(self, context: SkillContext) -> str:
|
|
74
|
+
"""
|
|
75
|
+
Retrieves the Venice AI API key based on the api_key_provider setting.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
The API key if found.
|
|
79
|
+
|
|
80
|
+
Raises:
|
|
81
|
+
ToolException: If the API key is not found or provider is invalid.
|
|
82
|
+
"""
|
|
83
|
+
try:
|
|
84
|
+
skillConfig = self.getSkillConfig(context=context)
|
|
85
|
+
if skillConfig.api_key_provider == "agent_owner":
|
|
86
|
+
agent_api_key = context.config.get("api_key")
|
|
87
|
+
if agent_api_key:
|
|
88
|
+
logger.debug(
|
|
89
|
+
f"Using agent-specific Venice API key for skill {self.name} in category {self.category}"
|
|
90
|
+
)
|
|
91
|
+
return agent_api_key
|
|
92
|
+
raise ToolException(
|
|
93
|
+
f"No agent-owned Venice API key found for skill '{self.name}' in category '{self.category}'."
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
elif skillConfig.api_key_provider == "platform":
|
|
97
|
+
system_api_key = self.skill_store.get_system_config("venice_api_key")
|
|
98
|
+
if system_api_key:
|
|
99
|
+
logger.debug(
|
|
100
|
+
f"Using system Venice API key for skill {self.name} in category {self.category}"
|
|
101
|
+
)
|
|
102
|
+
return system_api_key
|
|
103
|
+
raise ToolException(
|
|
104
|
+
f"No platform-hosted Venice API key found for skill '{self.name}' in category '{self.category}'."
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
else:
|
|
108
|
+
raise ToolException(
|
|
109
|
+
f"Invalid API key provider '{skillConfig.api_key_provider}' for skill '{self.name}'"
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
except Exception as e:
|
|
113
|
+
raise ToolException(f"Failed to retrieve Venice API key: {str(e)}") from e
|
|
114
|
+
|
|
115
|
+
async def apply_venice_rate_limit(self, context: SkillContext) -> None:
|
|
116
|
+
"""
|
|
117
|
+
Applies rate limiting to prevent exceeding the Venice AI API's rate limits.
|
|
118
|
+
|
|
119
|
+
Rate limits are applied based on the api_key_provider setting:
|
|
120
|
+
- 'agent_owner': uses agent-specific configuration.
|
|
121
|
+
- 'platform': uses system-wide configuration.
|
|
122
|
+
"""
|
|
123
|
+
try:
|
|
124
|
+
user_id = context.user_id
|
|
125
|
+
skillConfig = self.getSkillConfig(context=context)
|
|
126
|
+
|
|
127
|
+
if skillConfig.api_key_provider == "agent_owner":
|
|
128
|
+
limit_num = skillConfig.rate_limit_number
|
|
129
|
+
limit_min = skillConfig.rate_limit_minutes
|
|
130
|
+
|
|
131
|
+
if limit_num and limit_min:
|
|
132
|
+
logger.debug(
|
|
133
|
+
f"Applying Agent rate limit ({limit_num}/{limit_min} min) for user {user_id} on {self.name}"
|
|
134
|
+
)
|
|
135
|
+
await self.user_rate_limit_by_category(
|
|
136
|
+
user_id, limit_num, limit_min
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
elif skillConfig.api_key_provider == "platform":
|
|
140
|
+
system_limit_num = self.skill_store.get_system_config(
|
|
141
|
+
f"{self.category}_rate_limit_number"
|
|
142
|
+
)
|
|
143
|
+
system_limit_min = self.skill_store.get_system_config(
|
|
144
|
+
f"{self.category}_rate_limit_minutes"
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
if system_limit_num and system_limit_min:
|
|
148
|
+
logger.debug(
|
|
149
|
+
f"Applying System rate limit ({system_limit_num}/{system_limit_min} min) for user {user_id} on {self.name}"
|
|
150
|
+
)
|
|
151
|
+
await self.user_rate_limit_by_category(
|
|
152
|
+
user_id, system_limit_num, system_limit_min
|
|
153
|
+
)
|
|
154
|
+
# do nothing if no rate limit is
|
|
155
|
+
return None
|
|
156
|
+
|
|
157
|
+
except Exception as e:
|
|
158
|
+
raise ToolException(f"Failed to apply Venice rate limit: {str(e)}") from e
|
|
159
|
+
|
|
160
|
+
async def post(
|
|
161
|
+
self, path: str, payload: Dict[str, Any], context: SkillContext
|
|
162
|
+
) -> Tuple[Dict[str, Any], Optional[Dict[str, Any]]]:
|
|
163
|
+
"""
|
|
164
|
+
Makes a POST request to the Venice AI API using the `make_venice_api_request`
|
|
165
|
+
function from the `skills.venice_image.api` module.
|
|
166
|
+
|
|
167
|
+
This method handles the following:
|
|
168
|
+
|
|
169
|
+
1. Retrieving the API key using `get_api_key`.
|
|
170
|
+
2. Constructing the request payload.
|
|
171
|
+
3. Calling `make_venice_api_request` to make the actual API call.
|
|
172
|
+
4. Returning the results from `make_venice_api_request`.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
path: The API endpoint path (e.g., "/api/v1/image/generate").
|
|
176
|
+
payload: The request payload as a dictionary.
|
|
177
|
+
context: The SkillContext for accessing API keys and configs.
|
|
178
|
+
|
|
179
|
+
Returns:
|
|
180
|
+
A tuple: (success_data, error_data).
|
|
181
|
+
- If successful, success contains the JSON response from the API.
|
|
182
|
+
- If an error occurs, success is an empty dictionary, and error contains error details.
|
|
183
|
+
"""
|
|
184
|
+
api_key = self.get_api_key(context)
|
|
185
|
+
|
|
186
|
+
return await make_venice_api_request(
|
|
187
|
+
api_key, path, payload, self.category, self.name
|
|
188
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class VeniceImageConfig(BaseModel):
|
|
7
|
+
"""Skill Config for Venice Image."""
|
|
8
|
+
|
|
9
|
+
api_key_provider: str = Field(
|
|
10
|
+
default="agent_owner",
|
|
11
|
+
description="Provider of the API Key, could be agent_owner or platform",
|
|
12
|
+
)
|
|
13
|
+
safe_mode: bool = Field(
|
|
14
|
+
default=True,
|
|
15
|
+
description="Whether to use safe mode. If enabled, this will blur images that are classified as having adult content",
|
|
16
|
+
)
|
|
17
|
+
hide_watermark: bool = Field(
|
|
18
|
+
default=True,
|
|
19
|
+
description="Whether to hide the Venice watermark. Venice may ignore this parameter for certain generated content.",
|
|
20
|
+
)
|
|
21
|
+
embed_exif_metadata: bool = Field(
|
|
22
|
+
default=False, description="Whether to embed EXIF metadata in the image."
|
|
23
|
+
)
|
|
24
|
+
negative_prompt: str = Field(
|
|
25
|
+
default="(worst quality: 1.4), bad quality, nsfw",
|
|
26
|
+
description="The default negative prompt used when no other prompt is provided.",
|
|
27
|
+
)
|
|
28
|
+
rate_limit_number: Optional[int] = Field(
|
|
29
|
+
default=None,
|
|
30
|
+
description="Maximum number of allowed calls within the specified time window.",
|
|
31
|
+
)
|
|
32
|
+
rate_limit_minutes: Optional[int] = Field(
|
|
33
|
+
default=None,
|
|
34
|
+
description="Duration of the time window (in minutes) for rate limiting.",
|
|
35
|
+
)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# image_enhance
|
|
2
|
+
|
|
3
|
+
**Image Enhance** enables you to improve, stylize, or refine an existing image using the Venice AI enhancer. Unlike upscaling, this tool keeps the original image size but substantially upgrades its visual quality, style, or texture—ideal for creative, restoration, or polishing use-cases.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What does it do?
|
|
8
|
+
|
|
9
|
+
- Accepts a publicly accessible image URL.
|
|
10
|
+
- Uses a provided prompt to guide the desired enhancement—e.g., style, artistic direction, or quality upgrades (such as “gold accents”, “vivid color”, “oil painting”, or “gentle watercolor”).
|
|
11
|
+
- Supports adjustment of the intensity of enhancement and how much original detail is preserved (creativity & replication).
|
|
12
|
+
- Returns a new image (matching original dimensions) with enhanced appearance and style.
|
|
13
|
+
|
|
14
|
+
Typical uses:
|
|
15
|
+
- Sharpen and clarify blurry images.
|
|
16
|
+
- Instantly “re-theme” a photo or artwork (color, material, style transfer).
|
|
17
|
+
- Polish images for social, ecommerce, professional, or creative projects.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Input Parameters
|
|
22
|
+
|
|
23
|
+
| Field | Type | Description | Required | Default |
|
|
24
|
+
|-------------------|---------------|------------------------------------------------------------------------------------------------------------------|----------|---------|
|
|
25
|
+
| image_url | str (HttpUrl) | Publicly accessible URL of the image to enhance | Yes | |
|
|
26
|
+
| enhancePrompt | str | **Describes the desired enhancement, style, or theme.** Concise, descriptive terms work best. | Yes | |
|
|
27
|
+
| replication | float | How much of the original image structure, lines, and noise are retained (0.1–1.0). | No | 0.35 |
|
|
28
|
+
| enhanceCreativity | float | How far the AI can diverge from the original (0 = subtle, 1 = max stylization/new image). | No | 0.5 |
|
|
29
|
+
|
|
30
|
+
**Prompt Examples (for `enhancePrompt`):**
|
|
31
|
+
- `"marble, gold veins, high contrast"`
|
|
32
|
+
- `"vaporwave color palette, cyberpunk lighting"`
|
|
33
|
+
- `"oil painting, impasto brushwork"`
|
|
34
|
+
- `"smooth skin, brighten shadows, cinematic look"`
|
|
35
|
+
|
|
36
|
+
Example input:
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"image_url": "https://img.site/old-photo.png",
|
|
40
|
+
"enhancePrompt": "soft watercolor, pastel tones, gentle light",
|
|
41
|
+
"replication": 0.25,
|
|
42
|
+
"enhanceCreativity": 0.7
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Output
|
|
49
|
+
|
|
50
|
+
On success, returns:
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"success": true,
|
|
54
|
+
"result": "https://s3.storage.example/venice_image/image_enhance/ab12cd...png"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
On error:
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"success": false,
|
|
62
|
+
"error": "Failed to fetch or validate image from URL: ...",
|
|
63
|
+
"result": null
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Typical Use Cases
|
|
70
|
+
|
|
71
|
+
- **Commerce/Product Images**: Instantly polish web photos for catalogs or listings.
|
|
72
|
+
- **Restoration**: Revive faded or dated artwork/photos for social, framing, or print.
|
|
73
|
+
- **Style Transfer**: Make a photo look like “stained glass”, “anime cel”, or “movie still”.
|
|
74
|
+
- **Social & Art Creation**: Quickly freshen up images for sharing with a unique twist.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Advanced Notes
|
|
79
|
+
|
|
80
|
+
- **Replication**:
|
|
81
|
+
- Lower (`~0.1`): AI smooths out noise/details, crisper/cleaner look.
|
|
82
|
+
- Higher (`~0.9`): Retain original grit, preserve realistic features, more subtle change.
|
|
83
|
+
- **EnhanceCreativity**:
|
|
84
|
+
- Lower (`0.0`): Only very minor tweaks.
|
|
85
|
+
- Higher (`1.0`): Might look like a fully new artwork in the target style.
|
|
86
|
+
- **Image must be accessible and in a supported format**; conversion to PNG is automatic if needed.
|
|
87
|
+
- **Original resolution is kept**; for larger output, use `image_upscale` after enhancement.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Limitations
|
|
92
|
+
|
|
93
|
+
- Does not increase resolution—use in conjunction with upscaling for large deliverables.
|
|
94
|
+
- Not a restoration-of-lost-content tool: Real degradation or loss isn’t recoverable, though apparent fidelity can be improved.
|
|
95
|
+
- The style quality depends on the provided enhancement prompt and the source image clarity.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Example Usage (Python-esque pseudocode)
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
result = await agent.send_tool(
|
|
103
|
+
"image_enhance",
|
|
104
|
+
{
|
|
105
|
+
"image_url": "https://cdn.site/photo.jpg",
|
|
106
|
+
"enhancePrompt": "marble, gold details, glowing edges",
|
|
107
|
+
"enhanceCreativity": 0.9
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
enhanced_url = result["result"]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Attribution & Compliance
|
|
116
|
+
|
|
117
|
+
Use of this tool is subject to [Venice AI terms of service](https://venice.ai/) and applicable copyright law for input images.
|
|
118
|
+
|
|
119
|
+
---
|
|
File without changes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from langchain_core.runnables import RunnableConfig
|
|
5
|
+
from pydantic import HttpUrl
|
|
6
|
+
|
|
7
|
+
from intentkit.skills.base import ToolException
|
|
8
|
+
from intentkit.skills.venice_image.image_enhance.image_enhance_base import (
|
|
9
|
+
VeniceImageEnhanceBaseTool,
|
|
10
|
+
)
|
|
11
|
+
from intentkit.skills.venice_image.utils import fetch_image_as_base64
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ImageEnhance(VeniceImageEnhanceBaseTool):
|
|
17
|
+
"""
|
|
18
|
+
Enhances an existing image provided via URL using the Venice AI enhancer (not upscaling).
|
|
19
|
+
Useful for improving visual quality, adding style, or refining image features.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
name: str = "venice_image_enhance"
|
|
23
|
+
description: str = (
|
|
24
|
+
"Enhances an existing image from a URL using Venice AI.\n"
|
|
25
|
+
"Provide the public URL of the image to enhance.\n"
|
|
26
|
+
"Specify enhancement creativity level and a required prompt for style.\n"
|
|
27
|
+
"Returns the URL of the enhanced image."
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
async def _arun(
|
|
31
|
+
self,
|
|
32
|
+
image_url: HttpUrl,
|
|
33
|
+
enhancePrompt: str,
|
|
34
|
+
replication: Optional[float] = 0.35,
|
|
35
|
+
enhanceCreativity: Optional[float] = 0.5,
|
|
36
|
+
config: RunnableConfig = None,
|
|
37
|
+
**kwargs,
|
|
38
|
+
) -> dict:
|
|
39
|
+
"""
|
|
40
|
+
Applies AI enhancement to an image without changing its size.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
context = self.context_from_config(config)
|
|
45
|
+
|
|
46
|
+
await self.apply_venice_rate_limit(context)
|
|
47
|
+
|
|
48
|
+
image_base64 = await fetch_image_as_base64(image_url)
|
|
49
|
+
if not image_base64:
|
|
50
|
+
error_msg = f"Failed to fetch or validate image from URL: {image_url}"
|
|
51
|
+
logger.error(error_msg)
|
|
52
|
+
raise ToolException(
|
|
53
|
+
str({"success": False, "error": error_msg, "result": None})
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
payload = {
|
|
57
|
+
"image": image_base64,
|
|
58
|
+
"scale": 1,
|
|
59
|
+
"enhance": True,
|
|
60
|
+
"replication": replication,
|
|
61
|
+
"enhanceCreativity": enhanceCreativity,
|
|
62
|
+
"enhancePrompt": enhancePrompt,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
result, error = await self.post("api/v1/image/upscale", payload, context)
|
|
66
|
+
if error:
|
|
67
|
+
raise ToolException(f"Venice Image Enhance API error: {error}")
|
|
68
|
+
return result
|
|
69
|
+
except ToolException as e:
|
|
70
|
+
raise e
|
|
71
|
+
except Exception as e:
|
|
72
|
+
logger.error(f"Error in {self.name}: {str(e)}")
|
|
73
|
+
raise ToolException(
|
|
74
|
+
str(
|
|
75
|
+
{
|
|
76
|
+
"success": False,
|
|
77
|
+
"error": f"An unexpected error occurred: {str(e)}",
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import Type
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
# Import the generic base and shared input
|
|
6
|
+
from intentkit.skills.venice_image.base import VeniceImageBaseTool
|
|
7
|
+
from intentkit.skills.venice_image.image_enhance.image_enhance_input import (
|
|
8
|
+
VeniceImageEnhanceInput,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VeniceImageEnhanceBaseTool(VeniceImageBaseTool):
|
|
13
|
+
"""
|
|
14
|
+
Base class for Venice AI *Image Enchanching* tools.
|
|
15
|
+
Inherits from VeniceAIBaseTool and handles specifics of the
|
|
16
|
+
/image/upscale endpoint
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
args_schema: Type[BaseModel] = VeniceImageEnhanceInput
|
|
20
|
+
name: str = Field(description="The unique name of the image Enchanching tool.")
|
|
21
|
+
description: str = Field(
|
|
22
|
+
description="A description of what the image Enchanching tool does."
|
|
23
|
+
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class VeniceImageEnhanceInput(BaseModel):
|
|
7
|
+
"""Input for Venice Image Enhance tool (scale=1, enhance=True)."""
|
|
8
|
+
|
|
9
|
+
image_url: str = Field(
|
|
10
|
+
description="The URL of the image to enhance. Must be a publicly accessible URL."
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
enhancePrompt: str = Field(
|
|
14
|
+
...,
|
|
15
|
+
max_length=1500,
|
|
16
|
+
description=(
|
|
17
|
+
"Required prompt describing the desired enhancement style. "
|
|
18
|
+
"Best used with short descriptors like 'gold', 'marble', or 'angry, menacing'."
|
|
19
|
+
),
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
replication: Optional[float] = Field(
|
|
23
|
+
default=0.35,
|
|
24
|
+
ge=0.1,
|
|
25
|
+
le=1.0,
|
|
26
|
+
description=(
|
|
27
|
+
"How strongly lines and noise in the base image are preserved. "
|
|
28
|
+
"Higher values retain more noise and detail but are less smooth."
|
|
29
|
+
),
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
enhanceCreativity: float = Field(
|
|
33
|
+
default=0.5,
|
|
34
|
+
ge=0.0,
|
|
35
|
+
le=1.0,
|
|
36
|
+
description=(
|
|
37
|
+
"How much the enhancement AI is allowed to change the image. "
|
|
38
|
+
"0 = minimal change, 1 = generate a new image entirely."
|
|
39
|
+
),
|
|
40
|
+
)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Venice Image Generation Tools
|
|
2
|
+
|
|
3
|
+
Venice Image Generation provides flexible, prompt-based image creation using multiple state-of-the-art AI models via the Venice AI API. These tools support a broad spectrum of styles, subject matter, and output formats, making it ideal for artists, designers, marketers, research, and personal creativity.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
- **Purpose:** Synthesize original images from natural-language prompts.
|
|
10
|
+
- **Supported Models:** Choose from several world-class models, each suited for different tasks:
|
|
11
|
+
- **Fluently XL:** Professional realism, lighting, artistic work.
|
|
12
|
+
- **Flux Dev:** Artistic research, innovative and creative workflows.
|
|
13
|
+
- **Flux Dev Uncensored:** For unrestricted, uncensored generation (including NSFW).
|
|
14
|
+
- **Lustify SDXL:** Photorealistic, NSFW/SFW versatility.
|
|
15
|
+
- **Pony Realism:** High-detail anime/character design (great with Danbooru tags).
|
|
16
|
+
- **Venice SD35/Stable Diffusion 3.5:** Artistic, illustrative, or design content, powered by Stability AI.
|
|
17
|
+
- **Unified Interface:** Each model is its own sub-tool, but all support the same core set of options.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Input Parameters
|
|
22
|
+
|
|
23
|
+
| Field | Type | Description | Required | Default |
|
|
24
|
+
|------------------|---------------------------------|--------------------------------------------------------------------------------------------------------|----------|---------------|
|
|
25
|
+
| prompt | string | Main description of the image to generate. Use detailed, specific language for best results. | Yes | |
|
|
26
|
+
| model_id | string (see below) | AI model to use. Each sub-tool sets its own model_id internally. | N/A | (hardcoded) |
|
|
27
|
+
| width | int (max 2048) | Output image width (pixels). Must be multiple of 8 or 16 depending on model. | No | 1024 |
|
|
28
|
+
| height | int (max 2048) | Output image height (pixels). | No | 1024 |
|
|
29
|
+
| format | "png" \| "jpeg" \| "webp" | Output image format. | No | png |
|
|
30
|
+
| style_preset | string (enumerated) | Optional visual preset (e.g., "Photographic", "Anime", "Abstract", etc.). See full list below. | No | Photographic |
|
|
31
|
+
| negative_prompt | string | Exclude these elements or concepts from the image (e.g. “nsfw, low quality”). | No | suite default |
|
|
32
|
+
| seed | int | Control randomness. Reuse a value for repeatability. | No | random |
|
|
33
|
+
| cfg_scale | float (e.g. 1–20) | Prompt fidelity – higher = closer adherence to prompt, lower = more variety. | No | 7.5 |
|
|
34
|
+
| return_binary | bool | Always `False`. Output is a hosted URL, not inline binary. | N/A | False |
|
|
35
|
+
| safe_mode | bool | If enabled, applies content filtering / blurring for NSFW. | Inherited | true |
|
|
36
|
+
| embed_exif_metadata | bool | If enabled, embeds prompt info in output EXIF metadata. | Inherited | false |
|
|
37
|
+
| hide_watermark | bool | Hide the Venice watermark, where possible. | Inherited | true |
|
|
38
|
+
|
|
39
|
+
#### Example Prompt:
|
|
40
|
+
> "In the style of a Renaissance oil painting, a fierce orange tabby cat with a crown, surrounded by lush velvet drapery and golden sunlight."
|
|
41
|
+
|
|
42
|
+
#### Style Presets
|
|
43
|
+
An extensive list is included, for example:
|
|
44
|
+
- "Photographic"
|
|
45
|
+
- "Anime"
|
|
46
|
+
- "Cinematic"
|
|
47
|
+
- "Digital Art"
|
|
48
|
+
- "Abstract"
|
|
49
|
+
- "Cubist"
|
|
50
|
+
- ...and over 30 more. See documentation or schema for the full list.
|
|
51
|
+
|
|
52
|
+
#### Example Input:
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"prompt": "A highly detailed portrait of a robot playing chess, cinematic lighting, photoreal 4k",
|
|
56
|
+
"width": 1536,
|
|
57
|
+
"height": 1024,
|
|
58
|
+
"format": "jpeg",
|
|
59
|
+
"style_preset": "Cinematic",
|
|
60
|
+
"cfg_scale": 10,
|
|
61
|
+
"negative_prompt": "text, watermark, blurry",
|
|
62
|
+
"seed": 424242
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Output
|
|
69
|
+
|
|
70
|
+
The tool returns a dict that includes:
|
|
71
|
+
|
|
72
|
+
- `success`: true/false
|
|
73
|
+
- `image_url`: The URL to the generated image (stored in S3 or similar object storage)
|
|
74
|
+
- Additional metadata (generation params, seed, etc.)
|
|
75
|
+
|
|
76
|
+
Example:
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"success": true,
|
|
80
|
+
"image_url": "https://s3.my-storage.net/venice_image/fluently-xl/abc123f....png",
|
|
81
|
+
"seed": 424242,
|
|
82
|
+
"generation_time_s": 22.4
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
On error:
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"success": false,
|
|
90
|
+
"error": "API returned error: prompt too long",
|
|
91
|
+
"result": null
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Advanced Capabilities
|
|
98
|
+
|
|
99
|
+
- **Inpainting**: Modify regions of an existing image with precise mask and text controls (see schema for input structure).
|
|
100
|
+
- **EXIF Embedding**: If enabled, the tool can embed the prompt/config info in the output file’s EXIF metadata.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Use Cases
|
|
105
|
+
|
|
106
|
+
- **Art & Design:** Instantly create drafts, mood boards, or finished art for any assignment
|
|
107
|
+
- **Marketing/Content:** Rapid visual ideation for blog posts, social media, ads, covers, etc.
|
|
108
|
+
- **Ideation/Research:** Visualize concepts, inventions, or speculative scenarios quickly
|
|
109
|
+
- **Education:** Generate visual teaching content on demand
|
|
110
|
+
- **Character/Concept Design:** Leverage anime/artistic models for avatars, OC creation, comics
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Limitations
|
|
115
|
+
|
|
116
|
+
- Results are only as good as your prompt and model choice.
|
|
117
|
+
- NSFW filtering varies by model; check the tool’s description and enable `safe_mode` for safety.
|
|
118
|
+
- Some style/subject combinations may not be supported by a given model.
|
|
119
|
+
- Stable Diffusion/Flux Dev variants may have license restrictions—review Venice API and model TOS.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Example Usage (Pseudo-code)
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
result = await agent.send_tool(
|
|
127
|
+
"image_generation_fluently_xl",
|
|
128
|
+
{
|
|
129
|
+
"prompt": "A futuristic cityscape at sunset, neon lights, flying cars, cinematic",
|
|
130
|
+
"style_preset": "Cinematic",
|
|
131
|
+
"width": 1280,
|
|
132
|
+
"height": 704
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
url = result["image_url"]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Compliance & Attribution
|
|
141
|
+
|
|
142
|
+
You must respect [Venice AI terms of service](https://venice.ai/) and the terms and licenses of the selected model.
|
|
143
|
+
|
|
144
|
+
---
|
|
File without changes
|