Skip to main content

Authentication

Creatoria Agent API Documentation

#Authentication

All API requests require authentication. The Creatoria Agent API uses API Keys for identity verification.

#API Key Authentication

Include the API Key in the header of each request:

X-API-Key: sk_your_api_key_here

#Example

bashcurl -X GET "https://your-domain.com/v1/agents" \
  -H "X-API-Key: sk_your_api_key_here"

#Project Context

Some operations (such as creating an Agent) require a Project context. Pass it via the X-Project-Id request header:

X-Project-Id: proj_abc123

If the API Key is already bound to a Project, this header is not required. However, if the API Key is not bound to a Project, operations like creating an Agent require explicitly specifying one.

#Permissions and Roles

API Key permissions are controlled via the permissions field, which maps to the following roles:

API Key PermissionMapped RoleAllowed Operations
adminadminAll operations (GET, POST, PATCH, PUT, DELETE)
writememberRead and write operations (GET, POST, PATCH)
readviewerRead-only operations (GET)

#Permission Check Rules

Each endpoint declares its required permissions, for example:

Permission IdentifierDescription
agents:createCreate Agent
agents:updateUpdate Agent
agents:deleteDelete Agent
agent:chatChat with Agent
session:createCreate session
session:readView session
session:updateUpdate session
session:deleteDelete session
messages:readView message history
kb:readView knowledge base
kb:createCreate knowledge base
kb:writeUpdate knowledge base
kb:deleteDelete knowledge base
kb:uploadUpload document
rag:searchSearch knowledge base
tools:createCreate tool configuration
tools:updateUpdate tool configuration
tools:deleteDelete tool configuration
webhooks:createCreate Webhook
webhooks:readView Webhook
webhooks:updateUpdate Webhook
webhooks:deleteDelete Webhook

#Multi-Tenant Architecture

Creatoria uses a three-level tenant architecture:

Organization
  └── Project
       └── Agent
  • Organization: The top-level isolation unit with independent resources and quotas
  • Project: Project-level isolation for managing different business scenarios
  • Agent: The smallest resource unit, belonging to a specific Project

API Keys are associated with an Organization at creation time and can optionally be bound to a specific Project.

#Security Recommendations

  1. Do not expose API Keys in frontend code -- only use them in backend servers
  2. Use different API Keys for different environments (development, testing, production)
  3. Rotate API Keys regularly and delete keys that are no longer in use
  4. Follow the principle of least privilege: only grant API Keys the permissions they actually need