The API v1.0 has 10 function calls:
- Generate Images: Create images based on text prompts you provide.
- Text-to-Speech: Convert written text into spoken audio using different voice options.
- Chat with GPT: Answer questions or engage in conversation based on your prompts.
- Wolfram|Alpha Queries: Perform calculations or find factual information using Wolfram|Alpha's knowledge engine.
- Cryptocurrency Prices: Get current market data for cryptocurrencies.
- Stock Prices: Retrieve current market data for stocks using company names or ticker symbols.
- Token Balance: Check the balance of specific tokens in a given wallet address on various blockchain networks.
- Twitter KOL Tweets: Show tweets from key opinion leaders in the cryptocurrency space.
- Search News Articles: Find relevant news articles on various topics.
- Gemini 2.0 Flash with Search Tool: Respond based on real-time search results.
- Market Dynamics: Answer further questions about daily market analysis articles (from our channel).
Now let's try out one by one:
💡
Input: What can you do?
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_pzpaHBtXIaiyQlLFeyfAnOtiqgImllCw' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "what can you do"
}'
Output:
{
"code": 204,
"data": {
"content": "I can assist you with various tasks, including:\n\n1. **Image Generation**: Create images based on your prompts.\n2. **Text-to-Speech**: Convert text into audio using different voice options.\n3. **Chat and Query**: Engage in conversation or answer questions using AI.\n4. **Calculations and Facts**: Provide computational knowledge through Wolfram|Alpha.\n5. **Cryptocurrency Information**: Get current prices and market data for various cryptocurrencies.\n6. **Stock Prices**: Retrieve current prices for stocks using ticker symbols or company names.\n7. **Web3 News**: Access real-time cryptocurrency and Web3 news articles.\n8. **Twitter Insights**: Gather tweets from key opinion leaders in the Web3 and cryptocurrency space.\n9. **News Articles**: Search for relevant news articles on various topics.\n10. **Token Balance**: Check the token balance for specific wallet addresses on various blockchain networks.\n\nFeel free to ask about anything specific you'd like help with!",
"content_encoding": "UTF-8",
"content_format": "markdown",
"content_language": "en",
"content_name": null,
"content_size": 969,
"content_source": "openai/gpt-4o-mini",
"content_type": "text/markdown",
"metadata": {
"completion_tokens": 202,
"finish_reason": "stop",
"model": "gpt-4o-mini",
"new_balance": 16.35,
"parameters": {
"temperature": 0.7
},
"prompt_tokens": 984,
"role": "assistant",
"total_cost": 0.0002688,
"total_tokens": 1186
}
},
"message": "No content in response message",
"request_id": "87b1d193-27f6-4779-872a-ce2485ddf27f",
"status": "success",
"timestamp": "2024-12-12T15:28:02.943621+00:00"
}
I can assist you with various tasks, including:
- Image Generation: Create images based on your prompts.
- Text-to-Speech: Convert text into audio using different voice options.
- Chat and Query: Engage in conversation or answer questions using AI.
- Calculations and Facts: Provide computational knowledge through Wolfram|Alpha.
- Cryptocurrency Information: Get current prices and market data for various cryptocurrencies.
- Stock Prices: Retrieve current prices for stocks using ticker symbols or company names.
- Web3 News: Access real-time cryptocurrency and Web3 news articles.
- Twitter Insights: Gather tweets from key opinion leaders in the Web3 and cryptocurrency space.
- News Articles: Search for relevant news articles on various topics.
- Token Balance: Check the token balance for specific wallet addresses on various blockchain networks.
1. Generate Images:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "send me a picture of a cute dog"
}'
Output
{
"code": 200,
"data": {
"content": "https://replicate.delivery/czjl/Ybf28LttkuXrGqP4CSOd5mXr8l24bZQmd4ydfg4YVs22zM5TA/tmptazzzmsr.jpg",
"content_encoding": null,
"content_format": "url",
"content_language": null,
"content_source": "replicate/black-forest-labs/flux-pro",
"content_type": "image/jpeg",
"metadata": {
"aspect_ratio": "16:9",
"dimensions": "1024x720",
"model": "black-forest-labs/flux-pro",
"new_balance": 15.55,
"parameters": {
"aspect_ratio": "16:9",
"height": 720,
"prompt": "a cute dog",
"width": 1024
},
"prompt": "a cute dog",
"total_cost": 0.048
}
},
"message": "Image generated successfully",
"request_id": "ee532b01-23dd-4d54-932a-c896619f62bf",
"status": "success",
"timestamp": "2024-12-09T16:29:35.318546+00:00"
}
2. Text-to-Speech:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Create an audio clip of `I love you` in french."
}'
Output
{
"code": 200,
"data": {
"content": "https://api.sumatman.ai/audio/OOwOdKFAMFD.mp3",
"content_format": "url",
"content_source": "openai/tts-1",
"content_type": "audio/mpeg",
"metadata": {
"model": "tts-1",
"new_balance": 15.53,
"parameters": {
"model": "tts-1",
"voice": "alloy"
},
"text_length": 9,
"total_cost": 0.018,
"voice": "alloy"
}
},
"message": "Audio generated successfully",
"request_id": "0208bbdd-c2d8-4e2a-8fed-20608bc63f89",
"status": "success",
"timestamp": "2024-12-09T16:34:30.643286+00:00"
}
3. Chat with GPT:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Where is the capital of Japan"
}'
Output
{
"code": 200,
"data": {
"content": "The capital of Japan is Tokyo.",
"content_encoding": "UTF-8",
"content_format": "markdown",
"content_language": "en",
"content_name": null,
"content_size": 30,
"content_source": "openai/gpt-4o-mini",
"content_type": "text/markdown",
"metadata": {
"completion_tokens": 7,
"finish_reason": "stop",
"model": "gpt-4o-mini",
"new_balance": 15.53,
"parameters": {
"temperature": 0.7
},
"prompt_tokens": 24,
"role": "assistant",
"total_cost": 0.00000936,
"total_tokens": 31
}
},
"message": "Operation completed successfully",
"request_id": "cc53b395-9631-414c-9164-3a4eb88c6db8",
"status": "success",
"timestamp": "2024-12-09T16:35:47.195713+00:00"
}
4. Wolfram|Alpha Queries:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "95 f to c"
}'
Output
{
"code": 200,
"data": {
"content": "35 °C (degrees Celsius)",
"content_encoding": "UTF-8",
"content_format": "plain",
"content_language": "en",
"content_name": null,
"content_size": 24,
"content_source": "wolframalpha/v1",
"content_type": "text/plain",
"metadata": {
"api_version": "v1",
"endpoint": "result",
"new_balance": 15.53,
"query": "Convert 95 Fahrenheit to Celsius.",
"response_time": 1.519503,
"total_cost": 0.0012
}
},
"message": "Calculation completed successfully",
"request_id": "df832b6d-405c-4f30-8f7b-75f10d8b4991",
"status": "success",
"timestamp": "2024-12-09T16:37:48.637795+00:00"
}
5. Cryptocurrency Prices:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "price of ethereum"
}'
Output
{
"code": 200,
"data": {
"content": {
"content_string": "Symbol: ETH\nPrice: $3,834.9100\n24h Change: -3.78%\n24h Volume: $1,894,652,181.44",
"market_cap": null,
"price": 3834.91,
"price_change_percentage_24h": -3.781,
"symbol": "ETH",
"volume_24h": 1894652181.4409127
},
"content_format": "json",
"content_source": "binance",
"content_type": "crypto/ticker",
"metadata": {
"exchange": "Binance",
"new_balance": 15.53,
"pair": "ETH/USDT",
"total_cost": 0.001
}
},
"message": "Price retrieved successfully",
"request_id": "41639b8b-bc0a-4e73-a5d1-49f37db5c11e",
"status": "success",
"timestamp": "2024-12-09T16:38:42.368301+00:00"
}
6. Stock Prices:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "price of apple stock"
}'
Output
{
"code": 200,
"data": {
"content": {
"content_string": "Symbol: AAPL\nPrice: $246.74\n24h Change: 1.61%\n24h Volume: 15,377,941\nMarket Cap: $3,729,747,869,696",
"last_updated": "2024-12-09 00:00:00",
"market_cap": 3729747869696,
"price": 246.7449951171875,
"price_change_percentage_24h": 1.6080542077851996,
"symbol": "AAPL",
"volume_24h": 15377941
},
"content_format": "json",
"content_source": "yahoo/v1",
"content_type": "stock/ticker",
"metadata": {
"exchange": "NMS",
"new_balance": 15.53,
"query": "AAPL",
"response_time": 0.246732,
"symbol": "AAPL",
"timestamp": "2024-12-09T16:39:40.430071+00:00",
"total_cost": 0.001
}
},
"message": "Price retrieved successfully",
"request_id": "14f45d72-d8fb-445f-8ea1-dd6056b556b9",
"status": "success",
"timestamp": "2024-12-09T16:39:40.430028+00:00"
}
7. Token Balance:
Input (Picked a random address from etherscan)
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_Fmq4MQWU82VGIaCJgk8maulcs0e9oYPf' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "eth balance in 0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5"
}'
Output
{
"code": 200,
"data": {
"content": {
"address": "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5",
"balance": {
"amount": 5.240007848630163,
"raw_amount": 5240007848630162000,
"token_price": 3852.16,
"usd_value": 20185.34863417917
},
"chain": "eth",
"content_string": "Chain: eth\nToken: ETH (ETH)\nBalance: 5.2400\nUSD Value: $20,185.35\nToken Price: $3,852.1600\nLast Updated: 2024-12-09 16:43:47",
"last_updated": "2024-12-09 16:43:47",
"token": {
"contract_address": "eth",
"decimals": 18,
"logo_url": "https://static.debank.com/image/coin/logo_url/eth/6443cdccced33e204d90cb723c632917.png",
"name": "ETH",
"symbol": "ETH"
}
},
"content_format": "json",
"content_source": "debank/v1",
"content_type": "crypto/balance",
"metadata": {
"address": "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5",
"chain_id": "eth",
"chain_symbol": "eth",
"new_balance": 15.53,
"response_time": 0.288103,
"timestamp": "2024-12-09T16:43:47.880481+00:00",
"token_id": "eth",
"token_symbol": "ETH",
"total_cost": 0.0002
}
},
"message": "Token balance retrieved successfully",
"request_id": "c27e8c0e-2f2b-4b35-847f-8c1304d0ef49",
"status": "success",
"timestamp": "2024-12-09T16:43:47.592343+00:00"
}
8. Twitter KOL Tweets
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_pzpaHBtXIaiyQlLFeyfAnOtiqgImllCw' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "today’s kol tweet"
}'
Output
{
"code": 200,
"data": {
"content": "**OpenSea Updates:**\n\n1. **OpenSea Engagements:** The OpenSea account shared several tweets referencing the Pudgy Penguins, highlighting community interactions. You can explore the details [here](https://twitter.com/opensea/status/1867229667092292069).\n\n2. **Market Update:** CoinDesk reports that the CoinDesk 20 is trading at *3895.67*, an increase of *1.7% (+65.05)* since Wednesday. More details can be found [here](https://twitter.com/CoinDesk/status/1867229438447899036).\n\n3. **Further OpenSea Tweets:** More interactions about Pudgy Penguins continued through various tweets, showcasing community enthusiasm. Check them out:\n - [Tweet 1](https://twitter.com/opensea/status/1867228744298955151)\n - [Tweet 2](https://twitter.com/opensea/status/1867228653140004982)\n - [Tweet 3](https://twitter.com/opensea/status/1867224962546696293)\n - [Tweet 4](https://twitter.com/opensea/status/1867224892145271039)\n - [Tweet 5](https://twitter.com/opensea/status/1867224729708613827)\n - [Tweet 6](https://twitter.com/opensea/status/1867224603476541885)\n - [Tweet 7](https://twitter.com/opensea/status/1867224348362215638)\n - [Tweet 8](https://twitter.com/opensea/status/1867224004077015387)",
"content_format": "markdown",
"content_source": "mlion",
"content_type": "markdown/text",
"metadata": {
"language": "en",
"new_balance": 16.34,
"query_date": "2024-12-12",
"time_zone": "UTC",
"total_cost": 0.01,
"tweet_count": 37
}
},
"message": "KOL tweets retrieved successfully",
"request_id": "13e0654b-ccb6-4165-97db-2bbafd07fe5e",
"status": "success",
"timestamp": "2024-12-12T15:33:39.330823+00:00"
}
9. Search News Articles:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_pzpaHBtXIaiyQlLFeyfAnOtiqgImllCw' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "latest news of quantum computing"
}'
Output
{
"code": 200,
"data": {
"content": "1/5.\n`JABLONSKI: Quantum computing is like AI; it's part of the fourth industrial revolution.` >> Sylvia Jablonski, CEO and CIO at Defiance ETFs, discusses the growth potential of quantum computing stocks, likening them to early AI. She highlights the role of major players like Google and the importance of combining smaller companies like IONQ with established firms in their ETF.\n[Source](https://www.msn.com/en-us/money/other/jablonski-quantum-computing-is-like-ai-it-s-part-of-the-fourth-industrial-revolution/vi-AA1vJPjY)\n\n2/5.\n`Why Google's quantum computing breakthrough is such a big deal` >> Google's Willow chip reduces errors exponentially, addressing a problem the industry has faced for almost 30 years.\n[Source](https://www.msn.com/en-us/news/technology/why-googles-quantum-computing-breakthrough-is-such-a-big-deal/ar-AA1vHdLT)\n\n3/5.\n`Google’s New Quantum Computing Breakthrough May Someday Transform Your Business` >> The new machine isn’t quite a quantum leap in advancing the technology, but a project based on its Willow chip could hint at the future of AI and machine learning.\n[Source](https://www.msn.com/en-us/technology/artificial-intelligence/google-s-new-quantum-computing-breakthrough-may-someday-transform-your-business/ar-AA1vGABs)\n\n4/5.\n`Has Google Turned A Corner In Quantum And AI Computing` >> I totally underestimated Google’s ability to drive meaningful innovations in the compute realm. Here is its progress.\n[Source](https://www.forbes.com/sites/karlfreund/2024/12/11/has-google-turned-a-corner-in-quantum-and-ai-computing-/)\n\n5/5.\n`A New Way Of Computing – Breakthroughs In Photonic And Quantum Operations` >> We’re getting new advances in processing to complement all of the important things that LLMs and AI agents are doing.\n[Source](https://www.forbes.com/sites/johnwerner/2024/12/11/a-new-way-of-computing--breakthroughs-in-photonic-and-quantum-operations/)",
"content_format": "markdown",
"content_source": "bing",
"content_type": "markdown/text",
"metadata": {
"article_count": 5,
"freshness": "Day",
"market": "en-US",
"new_balance": 16.33,
"query": "quantum computing",
"total_cost": 0.005
}
},
"message": "News retrieved successfully",
"request_id": "b7dfe676-da67-42ba-8a1f-ded7ae56f31c",
"status": "success",
"timestamp": "2024-12-12T15:36:35.664350+00:00"
}
- Gemini 2.0 Flash with Search Tool:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_LXmixDFVsm1S6UhxNqI7w711kO2F8FZj' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Who won the most recent Australia vs Chinese Taipei games?"
}'
Output
{
"code": 200,
"data": {
"content": "Here are the recent game results between Australia and Chinese Taipei in different sports:\n\n* _Women's Soccer (Football)_\n * *December 7, 2024*: Australia defeated Chinese Taipei 6-0. The goal scorers for Australia were Leah Davidson, Tameka Yallop, Emily Gielnik, Michelle Heyman, Tash Prior and Sharn Freier.\n * *December 4, 2024*: Australia defeated Chinese Taipei 3-1. Natasha Prior and Sharn Freier scored for Australia, with Jin-wen Chen scoring for Chinese Taipei.\n\n* _Men's Soccer (Football)_\n * Since 2012, Australia and Chinese Taipei have played 2 games. Australia won both games, with a total of 15 goals scored compared to Chinese Taipei's 1 goal.\n\n* _Women's Basketball_\n * Since 2019, the teams have played 3 games, with Australia winning all 3.\n * In the 3 games, Chinese Taipei averaged 55.7 points per game, while Australia averaged 83.3 points per game.\n\n* _3x3 Basketball_\n * *July 10, 2022*: Australia defeated Chinese Taipei 21-8 at the FIBA 3x3 Asia Cup.\n\n* _Women's Soccer (Football) Head-to-Head_\n * Australia Women and Chinese Taipei (w) have played 6 games since 2008. Australia Women won all 6 games, scoring 25 goals to Chinese Taipei's 1 goal.\n\n* _Universiade Basketball_\n * Australia Universiade Team played against Chinese Taipei Universiade Team on July 7, 2019.\n\nIt appears that Australia has had a strong showing against Chinese Taipei in recent matches across multiple sports.\n",
"content_encoding": "UTF-8",
"content_format": "markdown",
"content_language": "en",
"content_name": null,
"content_size": 1466,
"content_source": "gemini/gemini-2.0-flash-exp",
"content_type": "text/markdown",
"metadata": {
"completion_tokens": 382,
"finish_reason": "STOP",
"model": "gemini-2.0-flash-exp",
"new_balance": 16.32,
"parameters": {
"temperature": 0
},
"prompt_tokens": 246,
"role": "assistant",
"search_used": true,
"total_cost": 0.00031932,
"total_tokens": 628
}
},
"message": "Operation completed successfully",
"request_id": "9d4790e4-53ed-46d1-ad20-8048363866b6",
"status": "success",
"timestamp": "2024-12-16T02:55:52.360937+00:00"
}
- Market Dynamics:
Input
curl -X 'POST' \
'https://api.sumatman.ai/v1/function' \
-H 'accept: application/json' \
-H 'X-API-Key: sa_onOk6UthOBzsIPTW1bOlztDG1MEYAabo' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "What'\''s current market vibe in tech sector"
}'
Output
{
"code": 200,
"data": {
"content": "`session_query_market` response:\n\nAs of December 17, 2024, the market sentiment in the technology sector is largely positive, buoyed by strong performance metrics and optimistic projections for the future. Here are some key highlights:\n\n### Key Points on Tech Sector Vibe:\n\n1. Rally in Technology Stocks: The technology sector, specifically represented by the Nasdaq Composite, has seen substantial gains, with the index recently hitting record highs. It rose approximately 34.5% for the year, indicating robust investor confidence. Tech stocks are currently leading market activity, making them the focus as investor sentiment strengthens ahead of the Federal Reserve's anticipated interest rate decision.\n\n2. Positive Predictions: Wedbush Securities' analyst, Dan Ives, forecasts significant expansion in the tech sector, driven by advancements in artificial intelligence (AI) and expected deregulation under the incoming administration of President-elect Donald Trump. He predicts that the Nasdaq Composite could potentially reach 25,000 within the next 18 months, branding the current climate as a \"Goldilocks scenario\" for tech firms.\n\n3. Investor Behavior: There is a growing inclination among investors to rotate back into technology stocks, responding to the anticipated pro-growth policies and optimism surrounding upcoming AI developments. This shift comes amidst broader market fluctuations, including a struggling Dow Jones Industrial Average, which is experiencing its longest losing streak since 1978.\n\n4. Sector Leaders: Major tech firms like Alphabet, Apple, and Tesla have reached new all-time highs, contributing positively to the Nasdaq's performance. Conversely, Nvidia has faced a few challenges, notably slipping into correction territory although its long-term growth potential remains a focal point for investors.\n\n5. Mixed Signals but Overall Optimism: While some analysts express caution due to potential economic downturns and the upcoming Federal Reserve decisions, the overall sentiment in the technology sector remains optimistic. The combination of a favorable economic backdrop, a strong interest in AI, and the upcoming policy environment under Trump are seen as significant catalysts for continued growth.\n\n### Conclusion:\nThe technology sector is positioned well as 2024 draws to a close, supported by positive financial metrics and an optimistic outlook for growth driven by AI. Investors are keenly watching how upcoming regulatory changes and economic policies might further influence tech stocks in the near term.\n\nFor further details, please see the original source of the information: [Market News, December 17, 2024](https://www.marketwatch.com/livecoverage/stock-market-today).",
"content_encoding": "UTF-8",
"content_format": "markdown",
"content_name": null,
"content_size": 2706,
"content_source": "openai-assistant/gpt-4o-mini",
"content_type": "text/markdown",
"is_session": true,
"metadata": {
"completion_tokens": 614,
"finish_reason": "completed",
"model": "gpt-4o-mini",
"new_balance": 16.24,
"parameters": {
"session_name": "session_query_market",
"tools_type": "file_search"
},
"prompt_tokens": 18958,
"role": "assistant",
"session_name": "session_query_market",
"total_cost": 0.0032121,
"total_tokens": 19572
}
},
"message": "Operation completed successfully",
"request_id": "56dd6bc5-6a37-4b14-bc30-8d3260d063e1",
"status": "success",
"timestamp": "2024-12-18T03:26:03.011602+00:00"
}