Building Your First App¶
This tutorial will guide you through building your first application using our AI-powered API.
Prerequisites¶
- An API key (get one from your dashboard)
- Basic programming knowledge (JavaScript, Python, or cURL)
Step 1: Set Up Your Project¶
Choose your preferred language and set up a new project directory. Install the required SDK or dependencies.
JavaScript/Node.js¶
Python¶
Step 2: Initialize the API Client¶
JavaScript¶
Python¶
Step 3: Make Your First API Call¶
Let's generate some text using the API.
JavaScript¶
const response = await client.generate({
prompt: 'Write a welcome message for my app',
model: 'gpt-4',
max_tokens: 100
});
console.log(response.content);
Python¶
response = client.generate(prompt='Write a welcome message for my app', model='gpt-4', max_tokens=100)
print(response.content)
Step 4: Handle Errors¶
Always handle errors gracefully in your code.
JavaScript¶
Python¶
Step 5: Next Steps¶
- Explore more endpoints in the API Reference
- Try out code examples
- Learn about rate limits
- Check our FAQ for help
Last update:
July 14, 2025
Created: July 14, 2025
Created: July 14, 2025