Authentication
Authentication methods for the DROYD API.
Authentication
The DROYD API supports two authentication methods depending on the endpoint.
Base URL: https://api.droyd.ai
API Key
Most endpoints accept an API key passed via the x-droyd-api-key header.
curl -X POST https://api.droyd.ai/api/v1/search \
-H "x-droyd-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "DeFi trends" }'You can generate and manage API keys from your Droyd dashboard.
x402 (Pay-per-Request)
Endpoints marked with x402 support the x402 payment protocol, allowing you to pay per request with USDC on Solana — no API key or account required.
How it works:
- Send a request to an x402-enabled endpoint without an API key.
- The server responds with
402 Payment Requiredand a payment payload describing the price and payment instructions. - Your client completes the USDC payment on Solana using the details in the 402 response.
- Re-send the original request with the payment proof in the
X-PAYMENTheader. - The server verifies the payment, executes the request, and settles the transaction.
If you include an
x-droyd-api-keyheader, the API will always use API key auth. x402 is only attempted when no API key header is present.
x402 Pricing
Pricing is dynamic and depends on the request parameters (e.g., result limit, query count, optional features).
Content Search (/api/v1/search)
| Component | Price |
|---|---|
| Base fee | $0.025 |
Per result (based on limit) | $0.005 each |
include_analysis: true | +$0.15 |
Formula: $0.025 + (limit × $0.005) + ($0.15 if include_analysis)
Examples:
- 25 results, no analysis: $0.15
- 25 results + analysis: $0.30
- 50 results + analysis: $0.43
Project Search (/api/v1/projects/search)
| Component | Price |
|---|---|
| Base fee | $0.025 |
| Per query | $0.005 each |
recent_content in include_attributes | +$0.025 |
Formula: $0.025 + (query_count × $0.005) + ($0.025 if recent_content)
Project Filter (/api/v1/projects/filter)
| Component | Price |
|---|---|
| Base fee | $0.025 |
Per result (based on limit) | $0.005 each |
recent_content in include_attributes | +$0.025 |
Formula: $0.025 + (limit × $0.005) + ($0.025 if recent_content)
Virality Analysis (/api/v1/data/virality)
| Component | Price |
|---|---|
| Base fee | $0.025 |
| Per query | $0.025 each |
include_timeseries: true | +$0.025 |
Formula: $0.025 + (query_count × $0.025) + ($0.025 if include_timeseries)
Technical Analysis (/api/v1/projects/technical-analysis)
| Component | Price |
|---|---|
| Per project per timeframe | $0.05 |
Formula: projects × timeframes × $0.05
Examples:
- 1 project, 1 timeframe: $0.05
- 3 projects, 2 timeframes: $0.30
- 5 projects, 4 timeframes: $1.00
Agent Create (/api/v1/agent/create)
| Component | Price |
|---|---|
| Flat fee | $3.00 |
Filter Agents (/api/v1/agents/filter)
| Component | Price |
|---|---|
| Base fee | $0.025 |
| Per result | $0.005 × limit |
| Attributes surcharge | +$0.025 (when include_attributes has items) |
Get Agents (/api/v1/agents/get)
| Component | Price |
|---|---|
| Base fee | $0.025 |
| Per query | $0.005 × number of queries |
| Attributes surcharge | +$0.025 (when include_attributes has items) |
File Read (/api/v1/files/read)
| Component | Price |
|---|---|
| Platform files (agent ID 2) | $0.05 flat |
| Non-platform files | File's run_amount_usd value |
Free when authenticated and the file belongs to your agent, swarm, or the platform. Authenticated users accessing other agents' files are charged via managed wallet debit.
File Search (/api/v1/files/search)
| Component | Price |
|---|---|
| Base fee | $0.025 |
Per result (based on limit) | $0.005 each |
Formula: $0.025 + (limit × $0.005)
Skill Search (/api/v1/skills/search)
| Component | Price |
|---|---|
| Base fee | $0.025 |
Per result (based on limit) | $0.005 each |
Formula: $0.025 + (limit × $0.005)