CraftStory Music API

The music API from CraftStory — 3 operation(s) for music.

GitHub OpenAPI

Operations 5

GET /music/ List your music tracks #
POST /music/ Create a music track #
GET /music/{id}/ Get one music track #
DELETE /music/{id}/ Delete a music track #
GET /music/{id}/status/ Poll a job #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/craftstory-com:craftstory-com-music-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

craftstory-com-music-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Craftstory Com Music API
  version: 1.0.0
  description: 'Operations tagged music across 2 of this provider''s published API definitions: craftstory-com-swagger.json, craftstory-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.craftstory.com/api/v1
security:
- ApiKey: []
tags:
- name: music
paths:
  /music/:
    parameters: []
    get:
      operationId: music_list
      summary: List your music tracks
      description: 'Music from a text prompt — a background bed, a jingle or a song of 5–180 s.


        Accepts ``Authorization: Bearer sk-cs-...`` API keys. Create a track with

        ``POST``, poll ``GET /music/{id}/status/`` until ``done``, then read

        ``audio_url`` (MP3) from ``GET /music/{id}/``.'
      parameters:
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Music'
      tags:
      - music
    post:
      operationId: music_create
      summary: Create a music track
      description: 'JSON or form. `prompt` describes the music: genre, mood, instruments, tempo, what it is for. `duration_s` 5–180 (default 30). `instrumental` (default true) guarantees a track without vocals; set it to false and put the lyrics or the theme in the prompt for a song.


        The provider declines prompts that name artists, existing songs or copyrighted lyrics: the job ends as `failed` with `status_failed` = `rejected_prompt`, the credits come back and `prompt_suggestion` carries a rewritten prompt that would pass.


        1 credit per second (5 minimum), charged up front and refunded in full if the job fails. Generation takes about as long as the track.


        Poll `GET /music/{id}/status/`, then read `audio_url` from `GET /music/{id}/`.'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Music'
      tags:
      - music
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MusicCreate'
        required: true
    servers:
    - url: https://api.craftstory.com/api/v1
  /music/{id}/:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: music_read
      summary: Get one music track
      description: 'Music from a text prompt — a background bed, a jingle or a song of 5–180 s.


        Accepts ``Authorization: Bearer sk-cs-...`` API keys. Create a track with

        ``POST``, poll ``GET /music/{id}/status/`` until ``done``, then read

        ``audio_url`` (MP3) from ``GET /music/{id}/``.'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Music'
      tags:
      - music
    delete:
      operationId: music_delete
      summary: Delete a music track
      description: 'Music from a text prompt — a background bed, a jingle or a song of 5–180 s.


        Accepts ``Authorization: Bearer sk-cs-...`` API keys. Create a track with

        ``POST``, poll ``GET /music/{id}/status/`` until ``done``, then read

        ``audio_url`` (MP3) from ``GET /music/{id}/``.'
      responses:
        '204':
          description: ''
      tags:
      - music
    servers:
    - url: https://api.craftstory.com/api/v1
  /music/{id}/status/:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: music_job_status
      summary: Poll a job
      description: 'Music from a text prompt — a background bed, a jingle or a song of 5–180 s.


        Accepts ``Authorization: Bearer sk-cs-...`` API keys. Create a track with

        ``POST``, poll ``GET /music/{id}/status/`` until ``done``, then read

        ``audio_url`` (MP3) from ``GET /music/{id}/``.'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MusicStatus'
      tags:
      - music
    servers:
    - url: https://api.craftstory.com/api/v1
components:
  schemas:
    Music:
      required:
      - prompt
      - duration_s
      - credits
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        name:
          title: Name
          type:
          - string
          - 'null'
          maxLength: 512
        status:
          title: Status
          type: string
          enum:
          - created
          - in_progress
          - done
          - failed
        status_failed:
          title: Status failed
          type:
          - string
          - 'null'
          enum:
          - rejected_prompt
          - failed_generation
          - null
        status_percentage:
          title: Status percentage
          type: integer
          readOnly: true
        credits_refunded:
          title: Credits refunded
          type: boolean
          readOnly: true
        prompt:
          title: Prompt
          type: string
          minLength: 1
        prompt_suggestion:
          title: Prompt suggestion
          type: string
        duration_s:
          title: Requested duration, seconds
          type: integer
          maximum: 32767
          minimum: 0
        instrumental:
          title: Instrumental
          type: boolean
        credits:
          title: Credits
          type: integer
          maximum: 2147483647
          minimum: 0
        audio_url:
          title: Audio url
          type:
          - string
          - 'null'
          readOnly: true
        created:
          title: Created
          type: string
          format: date-time
          readOnly: true
        updated:
          title: Updated
          type: string
          format: date-time
          readOnly: true
    MusicStatus:
      type: object
      properties:
        status:
          title: Status
          type: string
          enum:
          - created
          - in_progress
          - done
          - failed
        status_failed:
          title: Status failed
          type:
          - string
          - 'null'
          enum:
          - rejected_prompt
          - failed_generation
          - null
        status_failed_display:
          title: Status failed display
          type: string
          readOnly: true
        status_percentage:
          title: Status percentage
          type: integer
          readOnly: true
        credits_refunded:
          title: Credits refunded
          type: boolean
          readOnly: true
    MusicCreate:
      required:
      - prompt
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        name:
          title: Name
          type:
          - string
          - 'null'
          maxLength: 512
        prompt:
          title: Prompt
          type: string
          maxLength: 2000
          minLength: 1
        duration_s:
          title: Duration s
          type: integer
          default: 30
          maximum: 180
          minimum: 5
        instrumental:
          title: Instrumental
          type: boolean
          default: true
        credits:
          title: Credits
          type: integer
          readOnly: true
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
      description: Enter 'Bearer sk-cs-...' (your API key from Account → API Access).
x-refined-from:
- craftstory-com-swagger.json
- craftstory-com-openapi.yml