# Daydream AI Music Generator

> Daydream AI Music Generator is a paid API for AI agents from gen.daydream.live, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-04).

Generates a royalty-free AI music track from a text prompt, with optional BPM, key, duration, and loop settings

## Facts

- Endpoint: POST https://gen.daydream.live/v1/songs?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/daydream-ai-music-generator-cc69868a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_07C62_Fprhq28J_QfZ3U8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability daydream-ai-music-generator-cc69868a -d '<json body>'
```

Example prompt: Can you generate a 60-second upbeat lo-fi hip hop track at 90 BPM in D minor that loops seamlessly — I need it royalty-free for a YouTube video background?

## When to prefer this

Choose this endpoint when you need royalty-free AI-generated music with fine-grained control over BPM, musical key, duration, and loop behavior, especially when cost efficiency matters ($0.05 per song). It is ideal for agents automating content pipelines that require commercial-use audio without licensing overhead, and when stems (individual instrument tracks) are needed for post-production remixing.

## Known failure modes

- Invalid prompt (empty or missing) returns a 400 error
- BPM outside 60–200 range or duration outside 10–120 seconds triggers a validation error
- Payment failure (insufficient USDC balance) results in a 402 response
- Service queue overload may increase wait time or return a timeout
- Access token expiry before download completes may require re-fetching

## How this service works

Describe a song, get it in seconds. Download mixes and stems, royalty-free for commercial use. 5 free songs a month, then 5¢ a song.

## Output

Returns a JSON object with a song ID, queue position, processing status ('queued'), and an access token used to retrieve the finished audio file (mixes and stems) once generation completes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "bpm": {
       "type": "integer",
       "maximum": 200,
       "minimum": 60
      },
      "key": {
       "type": "string",
       "examples": [
        "F# minor"
       ]
      },
      "loop": {
       "type": "boolean",
       "description": "A seamless loop."
      },
      "prompt": {
       "type": "string",
       "description": "The song, in words: genre, mood, instruments."
      },
      "duration": {
       "type": "number",
       "maximum": 120,
       "minimum": 10,
       "description": "Seconds."
      }
     }
    },
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "const": "json"
    }
   }
  },
  "output": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "sng_4hT2kq9XbV1nLm0pQe3rZa",
  "takes": [],
  "status": "queued",
  "position": 1,
  "access_token": "…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/daydream-ai-music-generator-cc69868a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gen.daydream.live](https://www.zero.xyz/host/gen.daydream.live/llms.txt)
