Mazdek AI Songs (Stran) API

Generate original songs with Kurdish lyrics. Two modes: standard (our own hardware) and kurdi (Awaza Kurdî, premium engine, best for Kurdish idioms). With an API key both modes bill per song from your credit balance (see GET /api/keys/rates). Generation runs in the background: create → poll status → download audio. Preset styles (styleChip): kurdish_pop, saz_ballad, govend, grani, dengbej, heyran, heyranok, sin, lori, hore, siyacemane, koma_rock, halparke, kemence, narink, payizok, maqam, dengbej_fusion, acoustic, pop, rock, hiphop.

GitHub OpenAPI

Operations 6

POST /api/songs Create song #
GET /api/songs List my songs #
GET /api/songs/{song_id} Get song status #
DELETE /api/songs/{song_id} Delete song #
GET /api/songs/{song_id}/audio Download audio #
POST /api/songs/lyrics Write lyrics with mazdek AI #

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/mazdek-ai:mazdek-ai-songs-stran-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mazdek-ai-songs-stran-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: mazdek AI Songs (Stran) API
  version: '2026-11-16'
  description: 'Complete API collection for mazdek AI — Kurdish-first speech recognition, text-to-speech, chat, translation, spell checking, video clips and songs.


    Setup:

    1. Import this collection into Postman

    2. Set the `api_key` variable to your API key (Settings › API › Create API Key)

    3. Optionally change `base_url` if self-hosting


    Auth: `Authorization: Bearer mazdek_sk_…`. Creating a key needs at least $5 of lifetime credit top-ups (or received gifts); up to 10 active keys per account.


    Billing: API-key requests are billed per unit from your credit balance (live rates: GET /api/keys/rates) — never from the plan quota, and with no daily request cap. Your monthly spending limit (Settings › Usage) applies to API keys too. Amounts in error bodies are US cents:

    - 402 PAYMENT_REQUIRED {message, estimatedCost, balance} — the balance can''t cover the request

    - 402 SPENDING_LIMIT {message, estimatedCost, balance, monthlySpent, monthlyLimit} — your own monthly limit is reached


    Rate limits: API keys have their own limits, separate from the app and independent of your plan. Defaults per account (all your keys share them): chat 120 requests/min; speech generate/stream 60/min; speech jobs created 30/min; every other endpoint 600/min; 5 transcription jobs running at once with up to 100 more waiting in your account queue; 5 speech jobs at once. GET /api/keys/limits returns the limits in force for your key; they can be raised per account on request. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. 429 bodies: {code: "RATE_LIMITED", message, limit, retryAfter, resetAt}, {code: "QUEUE_FULL" | "JOB_LIMIT", message, limit, active, retryAfter} — always with a Retry-After header (seconds). A refused request does not count against the limit.


    Transcription queue: submit a whole batch at once. Jobs beyond the running limit are accepted with status "queued" and start in order; GET /api/jobs/:id shows queuePosition while a job waits.


    Webhooks: add webhook_url (https, publicly reachable) to POST /api/jobs, POST /api/jobs/url or POST /api/tts/jobs and we POST a small signed event to it when the job ends: {id, type, created, data: {id, status, …}} with type transcription.completed | transcription.failed | speech.completed | speech.failed. Verify the X-Mazdek-Signature header: "t=,v1=" where v1 = HMAC-SHA256(".") with your signing secret (Settings › API › Webhooks). Answer 2xx within 10 s; otherwise we retry up to 8 times over about 30 minutes. GET /api/keys/webhook-deliveries lists your last 50 deliveries.


    Safe retries: send a unique Idempotency-Key header with any POST. Repeating the request with the same key returns the first answer (header Idempotent-Replayed: true) instead of running — and charging — again. Keys are remembered for 24 hours; the same key with a different body returns 422 IDEMPOTENCY_KEY_REUSED, a repeat while the first is still running returns 409 IDEMPOTENCY_IN_PROGRESS. Audio and streamed answers are not replayed.


    Mixed-language lines: if your recordings can be in more than one language (e.g. a call centre taking Arabic and Soranî calls), send language "auto" with expected_languages "ar,ckb". Detection is then limited to those languages; a recording detected as anything else is transcribed again in the closest listed language.


    OpenAPI: the machine-readable specification is at https://mazdek.ai/openapi.json.


    Models:

    - Kurmancî / Soranî TTS: native Kurdish voices (1220+). Use model: "kurmanci" or "sorani"

    - Kurmancî / Soranî ASR: fine-tuned custom models. Use language: "ku" or "ckb" (Kirmanckî: "zza")

    - Multilingual: 32 languages TTS (model: "multilingual"), 90+ languages ASR'
servers:
- url: https://api.mazdek.ai
security:
- bearerAuth: []
tags:
- name: Songs (Stran)
  description: 'Generate original songs with Kurdish lyrics. Two modes: standard (our own hardware) and kurdi (Awaza Kurdî, premium engine, best for Kurdish idioms). With an API key both modes bill per song from your credit balance (see GET /api/keys/rates). Generation runs in the background: create → poll status → download audio.


    Preset styles (styleChip): kurdish_pop, saz_ballad, govend, grani, dengbej, heyran, heyranok, sin, lori, hore, siyacemane, koma_rock, halparke, kemence, narink, payizok, maqam, dengbej_fusion, acoustic, pop, rock, hiphop.'
paths:
  /api/songs:
    post:
      operationId: createSong
      tags:
      - Songs (Stran)
      summary: Create song
      description: 'Queue a song. Either styleChip or style is required. Give lyrics with [Verse]/[Chorus]/[Bridge] tags, or leave lyrics empty and set topic so the lyrics are written for you. Set instrumental=true for no vocals.


        Parameters:

        - lyrics: optional (default ""); the server keeps the first 3,000 chars; words in (parentheses) are backing vocals

        - mode: standard (default) | kurdi

        - styleChip: a preset style id (see folder description)

        - style: free-text style description, may be combined with styleChip

        - language: content language code (ku default, ckb, zza, tr, en, …)

        - instrumental: true | false (default false)

        - vocal: auto | female_high | female_low | male_high | male_low | raspy

        - length: short (~1 min) | normal (~2 min) | long (~3 min)

        - topic: what the song is about (used when lyrics is empty, at least 2 chars)

        - title: optional title (max 160)


        Returns { id } — poll GET /api/songs/{id}.'
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              title: Bihara Amedê
              mode: kurdi
              styleChip: kurdish_pop
              language: ku
              vocal: auto
              length: normal
              lyrics: '[Verse]

                Bihar hat, çiya kesk bûn

                Dilê min li te digere


                [Chorus]

                Amed, Amed, bajarê min

                Tu ronahiya rojên min'
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/IdempotencyInProgress'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
    get:
      operationId: listMySongs
      tags:
      - Songs (Stran)
      summary: List my songs
      description: Your songs, newest first.
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
  /api/songs/{song_id}:
    get:
      operationId: getSongStatus
      tags:
      - Songs (Stran)
      summary: Get song status
      description: 'Status and metadata of a song: status (queued | processing | ready | failed), title, duration, style chip, lyrics, timed lyrics when available. Poll every few seconds until status is ready; failed jobs are not billed.'
      parameters:
      - name: song_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
    delete:
      operationId: deleteSong
      tags:
      - Songs (Stran)
      summary: Delete song
      description: Deletes the song and its audio.
      parameters:
      - name: song_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
  /api/songs/{song_id}/audio:
    get:
      operationId: downloadAudio
      tags:
      - Songs (Stran)
      summary: Download audio
      description: Downloads the MP3 of a ready song. Responds with a 302 redirect to a short-lived signed URL (Postman and `curl -L` follow it automatically); 404 until the song is ready. The same file is also available as `audioUrl` in the status response.
      parameters:
      - name: song_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
  /api/songs/lyrics:
    post:
      operationId: writeLyricsWithMazdekAI
      tags:
      - Songs (Stran)
      summary: Write lyrics with mazdek AI
      description: 'Ask mazdek AI to write original lyrics for a topic in the given language, shaped to the chosen style (verse/chorus structure, or no chorus for dengbêj/heyran). Uses chat quota.


        Parameters:

        - language: ku | ckb | zza | tr | en …

        - topic: what the song is about (2-500 chars)

        - styleChip: optional preset style id

        - style: optional free-text style'
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              language: ku
              topic: Hesreta gundê min di payîzê de
              styleChip: payizok
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/IdempotencyInProgress'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  headers:
    X-RateLimit-Limit:
      description: Requests allowed in the current window
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix seconds when the window resets
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left in the current window
      schema:
        type: integer
    Retry-After:
      description: Seconds to wait before sending the request again
      schema:
        type: integer
  responses:
    IdempotencyInProgress:
      description: IDEMPOTENCY_IN_PROGRESS — the first request with this Idempotency-Key is still running
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: PAYMENT_REQUIRED (balance too low) or SPENDING_LIMIT (monthly limit reached)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Temporarily busy or under maintenance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, invalid or revoked API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: IDEMPOTENCY_KEY_REUSED (same key, different request) or TRANSLATION_REFUSED
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: API_SERVICE_UNAVAILABLE (no API price for this service) or FORBIDDEN
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: RATE_LIMITED, QUEUE_FULL (transcription queue full) or JOB_LIMIT (too many speech jobs)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
  schemas:
    Success:
      type: object
      required:
      - success
      properties:
        success:
          const: true
        data: {}
      additionalProperties: true
    Error:
      type: object
      required:
      - success
      - error
      properties:
        success:
          const: false
        error:
          description: An object with a machine-readable code; a few older endpoints answer with a plain message string.
          oneOf:
          - type: string
          - type: object
            required:
            - code
            properties:
              code:
                type: string
                examples:
                - RATE_LIMITED
                - QUEUE_FULL
                - PAYMENT_REQUIRED
              message:
                type: string
              limit:
                type: integer
              active:
                type: integer
              retryAfter:
                type: integer
                description: Seconds
              resetAt:
                type: string
                format: date-time
              estimatedCost:
                type: number
                description: US cents
              balance:
                type: number
                description: US cents
            additionalProperties: true
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: 'Unique string (1–255 printable ASCII characters). A repeat of the same request with the same key returns the first answer (header Idempotent-Replayed: true) instead of running again. Remembered for 24 hours per account. Audio and streamed answers are not replayed.'
      schema:
        type: string
        maxLength: 255
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key: Authorization: Bearer mazdek_sk_…'