***
title: API Reference
subtitle: Programmatic access to the Elacity platform
slug: api-reference
-------------------
The Elacity API lets you manage registries, agents, environments, deployments, and more from your own tooling, CI/CD pipelines, or custom integrations.
## Base URL
All API endpoints are available at:
```
https://elacity.ai/api
```
## Authentication
Authenticate requests by passing your API key in the `X-API-Key` header:
```bash
curl -H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://elacity.ai/api/environments/list \
-d '{"orgSlug": "your-org"}'
```
API keys are scoped to your organization. To create one, see [API Keys](/api-keys).
Public prompt registries can be accessed without authentication. Private registries require a valid API key belonging to the same organization.
## Request Format
Most endpoints accept `POST` requests with a JSON body:
```bash
curl -X POST https://elacity.ai/api/agents/list \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"orgSlug": "your-org"}'
```
## Error Handling
The API returns standard HTTP status codes:
| Status | Meaning |
| ------ | -------------------------------------------------- |
| `200` | Success |
| `400` | Bad request — check your input parameters |
| `401` | Unauthorized — missing or invalid API key |
| `403` | Forbidden — valid key but insufficient permissions |
| `404` | Not found — resource does not exist |
| `429` | Rate limited — slow down and retry |
| `500` | Internal error — contact support if persistent |
Error responses include a `message` field describing the issue.
## Available Resources
Publish, list, and retrieve versioned prompt artifacts from registries.
Create, configure, and deploy AI agents with provider settings and tool references.
Manage deployment environments, provider credentials, and secrets.
View deployment history, status, and heatmaps across your infrastructure.
Group and manage agent configurations across environments.
Configure connections to OpenAI, Anthropic, Google, OpenRouter, and custom providers.
## Getting Started
If you haven't set up API access yet:
1. [Create an account](/creating-an-account) on the Elacity platform
2. [Generate an API key](/api-keys) from your account settings
3. Explore the endpoints in the sidebar to start building