Skip to content

Eden API Overview#

The Eden API provides programmatic access to Eden's AI agents, creative tools, and generation capabilities. This RESTful API allows you to integrate Eden's AI-powered content creation directly into your applications.

Getting Started#

Base URL#

https://api.eden.art

Authentication#

All API requests require authentication using an API key passed in the request headers:

X-Api-Key: your-api-key-here
Content-Type: application/json

API Key Security

Never expose API keys in frontend code. Use environment variables or a backend proxy to keep your keys secure.

Getting Your API Key#

To access the Eden API, you'll need to obtain an API key:

  1. Login to Eden: Visit app.eden.art and sign into your account
  2. Navigate to Settings: Go to Settings → API
  3. Generate API Key: Create a new API key for your application
  4. Store Securely: Save this key in a secure location (environment variables, secrets manager)
  5. Use in Requests: Include the key in the X-Api-Key header for all API calls

API Key Management

  • Each API key can be named and managed separately
  • You can create multiple keys for different applications or environments
  • Keys can be revoked if compromised
  • Monitor your API usage through the Eden dashboard

Core Concepts#

The Eden API is built around several key concepts:

Sessions#

The API uses a session-based communication model. You create persistent sessions with specific AI agents to maintain context and conversation history across multiple interactions.

Agents#

Eden provides various specialized AI agents, each with unique capabilities. You can interact with one or multiple agents within a single session.

Budgets#

Sessions operate within defined resource budgets to control computational costs and usage limits.

Quick Start Example#

Here's a minimal example to get you started:

// Create a session
const sessionResponse = await fetch('https://api.eden.art/v2/sessions/create', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    agent_ids: ['agent-id-here'],
    title: 'My First Session',
    budget: {
      manna_budget: 1000,
      token_budget: 10000,
      turn_budget: 100
    }
  })
});

const { session_id } = await sessionResponse.json();

// Send a message
const messageResponse = await fetch('https://api.eden.art/v2/sessions', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    session_id: session_id,
    content: 'Hello! Can you help me create something amazing?',
    stream: true
  })
});

API Endpoints Overview#

The Eden API provides several core endpoint categories:

Sessions#

Manage persistent conversations with AI agents: - Create, update, and delete sessions - Send messages and receive responses - Configure agent behavior and budgets

Agents#

Discover and interact with available AI agents: - List all available agents - Get detailed agent information and capabilities - Understand agent specializations

Response Formats#

The API supports both streaming and non-streaming responses:

  • Streaming: Receive real-time chunks as content is generated (recommended for better UX)
  • Non-streaming: Wait for complete response before receiving data

Error Handling#

The API returns standard HTTP status codes:

  • 200 - Success
  • 400 - Bad Request (invalid parameters)
  • 401 - Unauthorized (invalid API key)
  • 404 - Not Found (invalid session/agent ID)
  • 429 - Rate Limited (too many requests)
  • 500 - Internal Server Error

Next Steps#

Ready to dive deeper? Explore these key areas:

Support#

For API support and questions: - Visit the full API documentation - Check existing GitHub issues - Join our community for discussions and support