Skip to main content

Quickstart Guide

This guide will help you make your first API call to Nexus in just 5 minutes. By the end, you’ll have created a chat session and sent your first message.

Prerequisites

Before you begin, make sure you have:

Nexus Account

Sign up at nexusgpt.io if you haven’t already

API Key

Generate an API key from your dashboard (see Authentication)

Step 1: Set Up Your Environment

First, store your API key securely as an environment variable:

Step 2: Create a Chat Session

Let’s create your first chat session. This establishes a conversation thread with your AI agent.
Expected Response:
Save the id from the response - you’ll need it to send messages to this session.

Step 3: Send a Message

Now let’s send a follow-up message to the session we just created:

Step 4: Retrieve Messages

To see the conversation history, including the AI’s responses:
Expected Response:

Complete Working Example

Here’s a complete example that ties everything together:

Next Steps

Congratulations! You’ve successfully:
  • ✅ Created a chat session
  • ✅ Sent messages to your AI agent
  • ✅ Retrieved conversation history
Now explore more advanced features:

API Reference

Explore all available endpoints and parameters

SDK Examples

Find complete examples in multiple languages

Error Handling

Learn how to handle errors gracefully

Best Practices

Optimize your integration for production

Troubleshooting

  • Verify your API key is correct
  • Check that the header name is exactly api-key
  • Ensure there are no extra spaces or characters
  • Confirm you’re using the correct session ID
  • Check that the session hasn’t expired
  • Try creating a new session
  • Wait a bit longer (2-3 seconds) before fetching messages
  • Check that your agent is properly configured
  • Verify the agent has the necessary permissions
Need help? Contact support at shady@gpt.nexus