5-Minute Quickstart
Get up and running with the Arvae AI API in under 5 minutes. This guide will walk you through creating an account, getting your API key, and making your first successful API call.
Get Your API Key
First, you'll need an API key to authenticate your requests. If you don't have an account yet, signing up is free and gives you credits to get started.
New users get free credits!
When you sign up, you'll receive free credits to test the API. No credit card required to get started.
Sign up for an account
Navigate to API Keys
Go to your dashboard → API Keys
Create a new key
Click "Create New API Key" and give it a descriptive name
Copy and store securely
Copy your API key immediately - you won't be able to see it again
Security Note
Never share your API key publicly or include it in client-side code. Store it as an environment variable.
Install Dependencies (Optional)
Choose your preferred method for making API calls. You can use the official OpenAI SDK (recommended), your language's HTTP library, or even cURL from the command line.
Python
1# Using OpenAI SDK (recommended)\npip install openai\n\n# Or using requests\npip install requests
Node.js
1# Using OpenAI SDK (recommended)\nnpm install openai\n\n# Or use fetch (built-in Node.js 18+)\n# No installation needed
Tip: The OpenAI SDK works seamlessly with Arvae AI. Just change the base URL and you're ready to go!
Make Your First API Call
Here are complete, working examples in different languages. Replace YOUR_API_KEY
with your actual API key.
Python with OpenAI SDK
1import openai
2
3# Initialize the OpenAI client
4client = openai.OpenAI(
5 api_key="YOUR_API_KEY",
6 base_url="https://arvae.ai/api/v1"
7)
8
9# Define the messages to send
10messages = [
11 {
12 "role": "user",
13 "content": "Hello, can you help me with a coding question?"
14 }
15]
16
17# Call the API
18response = client.chat.completions.create(
19 model="<Model Name>",
20 messages=messages,
21 temperature=0.7,
22 max_tokens=1000,
23 top_p=1.0,
24 stream=False
25)
26
27# Print the response
28print(response.choices[0].message.content)
Node.js with OpenAI SDK
1import OpenAI from 'openai';
2
3// Initialize the OpenAI client
4const openai = new OpenAI({
5 apiKey: 'YOUR_API_KEY',
6 baseURL: 'https://arvae.ai/api/v1'
7});
8
9// Define the messages to send
10const messages = [
11 {
12 "role": "user",
13 "content": "Hello, can you help me with a coding question?"
14 }
15];
16
17async function main() {
18 try {
19 // Call the API
20 const response = await openai.chat.completions.create({
21 model: "<Model Name>",
22 messages,
23 temperature: 0.7,
24 max_tokens: 1000,
25 top_p: 1.0,
26 stream: false
27 });
28
29 // Log the response
30 console.log(response.choices[0].message.content);
31 } catch (error) {
32 console.error('Error:', error);
33 }
34}
35
36main();
cURL (Command Line)
1curl https://arvae.ai/api/v1/chat/completions \
2 -H "Content-Type: application/json" \
3 -H "Authorization: Bearer YOUR_API_KEY" \
4 -d '{
5 "model": "<Model Name>",
6 "messages": [
7 {
8 "role": "user",
9 "content": "Hello, who are you?"
10 }
11 ],
12 "temperature": 0.7,
13 "max_tokens": 1024,
14 "top_p": 1.0,
15 "stream": false
16 }'
Understanding the Response
When you run any of the above examples, you'll get a JSON response like this:
1{
2 "id": "chatcmpl-abc123",
3 "object": "chat.completion",
4 "created": 1699896916,
5 "model": "openai/chatgpt-4o-latest",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "content": "Hello! I'm an AI assistant created by Arvae AI. How can I help you today?"
12 },
13 "logprobs": null,
14 "finish_reason": "stop"
15 }
16 ],
17 "usage": {
18 "prompt_tokens": 12,
19 "completion_tokens": 18,
20 "total_tokens": 30
21 }
22}
Success!
If you see a response like this, congratulations! You've successfully made your first API call to Arvae AI. The AI's response is in choices[0].message.content
.
Common Issues & Solutions
❌ "No API key provided"
This means your API key isn't being sent with the request.
- Make sure you've replaced
YOUR_API_KEY
with your actual key - Check that your environment variable is set correctly
- Verify the Authorization header is included in your request
❌ "Invalid API key"
Your API key format is incorrect or the key doesn't exist.
- Double-check you copied the entire API key
- Make sure there are no extra spaces or characters
- Verify the key hasn't been revoked in your dashboard
❌ "Insufficient credits"
You don't have enough credits to make the API call.
- Check your credit balance
- Purchase more credits if needed
- Try a smaller request to use fewer tokens
Next Steps
🔧 Set Up Your Environment
Learn proper environment setup, API key management, and development best practices.
Environment Setup Guide →🧠 Understand Core Concepts
Dive deeper into models, authentication, pricing, and how the API works.
Core Concepts →📖 API Reference
Complete API documentation with all parameters, response formats, and examples.
API Reference →🚀 Try the Playground
Test different models and parameters interactively before writing code.
Open Playground →Ready to Build Something Amazing?
Now that you've made your first API call, explore our guides and examples to build powerful AI applications.