Supported Platforms - n8n, Make, IFTTT Integration
Quickly integrate 1shotAPI into your applications with our comprehensive guides and code examples.
The 1ShotAPI n8n node lets you read and write to any EVM blockchain from your n8n workflows. 1ShotAPI is a powerful managed wallet and transaction service for the EVM ecosystem; it ensures transactions are confirmed (handling retries and gas optimization) and sends webhook callbacks when they are finalized, making it perfect for use in any AI workflow platform.
It also allows smart contract functions to be used like tools by agents; 1ShotAPI Prompts provides a contract library with detailed prompts at the contract, function, input and output level so that agents and LLMs can better reason about how to use smart contracts to fullfil a user task. Additionally, 1Shot Prompts lets humans and agents search for smart contracts semantically, so you don't have manually find your target smart contract by parsing through blockscanners. n8n is a fair-code licensed workflow automation platform.
import requests
api_key = "YOUR_API_KEY"
endpoint = "https://api.1shotapi.com/v1/text-generation"
payload = {
"prompt": "Translate 'Hello, world!' to French.",
"model": "gpt-4-mini"
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.post(endpoint, json=payload, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code}, {response.text}")const axios = require('axios');
const apiKey = "YOUR_API_KEY";
const endpoint = "https://api.1shotapi.com/v1/image-generation";
const payload = {
"prompt": "A futuristic cityscape at sunset",
"size": "1024x1024"
};
const headers = {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
};
axios.post(endpoint, payload, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(`Error: ${error.response.status}, ${error.response.data}`);
});For more detailed information, visit our full API reference.