---
title: Suno Konwertuj audio | RunAPI
description: Użyj punktu końcowego convert audio, aby utworzyć asynchroniczne Zadanie
  (Task).
url: https://runapi.ai/pl/docs/api/suno/convert-audio.md
canonical: https://runapi.ai/pl/docs/api/suno/convert-audio
locale: pl
---

> Wersja HTML: https://runapi.ai/pl/docs/api/suno/convert-audio
> Indeks witryny dla agentów: https://runapi.ai/llms.txt

# Suno Konwertuj audio

## Omówienie

Użyj punktu końcowego convert audio z wymaganymi danymi wejściowymi. Użyj zwróconego identyfikatora Zadania (Task ID), aby pobrać jego stan, lub podaj callback_url dla dostarczeń opisanych poniżej.

### Szybki start

1. Utwórz klucz API i ustaw go jako RUNAPI_API_KEY.
2. Wyślij żądanie POST, którego treść odpowiada schematowi żądania.
3. Zapisz zwrócony identyfikator zadania, a następnie odpytuj do momentu osiągnięcia stanu końcowego lub obsłuż wywołania zwrotne opisane poniżej.

## Punkt końcowy

POST /api/v1/suno/convert_audio

Bazowy URL: https://runapi.ai

Wersja API: v1

Uwierzytelnianie: Authorization: Bearer YOUR_API_TOKEN

## Obsługiwane modele

Otwórz stronę modelu, aby zapoznać się z aktualnymi cenami, limitami żądań i szczegółami dotyczącymi użytku komercyjnego.

- [Suno](https://runapi.ai/pl/models/suno)

## Schemat żądania

Wysyłaj wyłącznie udokumentowane pola. Gdy podany jest callback_url, odbiera on dostarczenia zadania opisane poniżej.

### Treść żądania

```json
{
  "audio_id": {
    "description": "ID audio w ramach zadania źródłowego.",
    "required": true,
    "type": "string"
  },
  "callback_url": {
    "description": "URL webhooka dla powiadomień asynchronicznych.",
    "type": "string"
  },
  "task_id": {
    "description": "Identyfikator zadania źródłowego.",
    "required": true,
    "type": "string"
  }
}
```

## Tworzenie akceptacji

HTTP 202 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Odpytywanie w toku

HTTP 200 - GET /api/v1/suno/convert_audio/:id

### Schemat odpowiedzi

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "wav_url": {
      "type": "string",
      "x-runapi-generated-media": true
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Odpytywanie zakończone

HTTP 200 - GET /api/v1/suno/convert_audio/:id

### Schemat odpowiedzi

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "wav_url": {
      "type": "string",
      "x-runapi-generated-media": true
    }
  },
  "required": [
    "id",
    "status",
    "wav_url",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "completed",
  "wav_url": "https://file.runapi.ai/reference-audio.wav"
}
```

## Odpytywanie nie powiodło się

HTTP 200 - GET /api/v1/suno/convert_audio/:id

### Schemat odpowiedzi

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Wywołanie zwrotne klienta: ukończono

HTTP 200 - POST callback_url

### Schemat odpowiedzi

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "wav_url": {
      "type": "string",
      "x-runapi-generated-media": true
    }
  },
  "required": [
    "id",
    "status",
    "wav_url"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "id": "tsk_reference_demo",
  "status": "completed",
  "wav_url": "https://file.runapi.ai/reference-audio.wav"
}
```

## Wywołanie zwrotne klienta: niepowodzenie

HTTP 200 - POST callback_url

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "limit_cents": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "reset_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "used_cents": {
              "type": "integer"
            },
            "window": {
              "enum": [
                "1h",
                "1d",
                "7d",
                "daily",
                "weekly",
                "monthly",
                "lifetime"
              ],
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Błędy

HTTP 401 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "Authentication required"
}
```

## Błędy

HTTP 401 - GET /api/v1/suno/convert_audio/:id

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "Authentication required"
}
```

## Błędy

HTTP 400 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Czytelny dla człowieka komunikat o błędzie.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Czytelne dla człowieka podsumowanie walidacji.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Komunikaty walidacyjne identyfikowane przez publiczne pole żądania, z tablicą czytelnych dla człowieka ciągów znaków dla każdego pola.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### Przykład odpowiedzi

```json
{
  "error": "Validation failed",
  "errors": {
    "task_id": [
      "is required"
    ]
  }
}
```

## Błędy

HTTP 402 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "Insufficient balance"
}
```

## Błędy

HTTP 429 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "API key credit limit exceeded"
}
```

## Błędy

HTTP 409 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "The request uses features that are not supported for the selected model"
}
```

## Błędy

HTTP 429 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "Rate limit reached. Please retry later."
}
```

## Błędy

HTTP 503 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "Service under maintenance, please try again later"
}
```

## Błędy

HTTP 504 - POST /api/v1/suno/convert_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "The request timed out"
}
```

## Błędy

HTTP 404 - GET /api/v1/suno/convert_audio/:id

### Schemat odpowiedzi

```json
{
  "properties": {
    "error": {
      "description": "Czytelny dla człowieka komunikat o błędzie.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "error": "Task with id 'tsk_reference_demo' not found"
}
```

## Wygenerowane przykłady kodu

Używaj bezpośrednio cURL lub zainstaluj SDK dla swojego języka. Każdy przykład przesyła zwalidowane żądanie pokazane w tej dokumentacji.

### curl

```curl
curl -X POST https://runapi.ai/api/v1/suno/convert_audio \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"task_id":"tsk_source_music","audio_id":"audio_reference"}'
```

### javascript

#### Instalacja

```bash
npm install @runapi.ai/suno
```

```javascript
import { SunoClient } from "@runapi.ai/suno";

const client = new SunoClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.convertAudio.create({
  "task_id": "tsk_source_music",
  "audio_id": "audio_reference"
});
```

### python

#### Instalacja

```bash
pip install runapi-suno
```

```python
import os
from runapi.suno import SunoClient

client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.convert_audio.create(
  task_id="tsk_source_music",
  audio_id="audio_reference"
)
```

### go

#### Instalacja

```bash
go get github.com/runapi-ai/suno-sdk/go@latest
```

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  suno "github.com/runapi-ai/suno-sdk/go/suno"
)

func main() {
  client, err := suno.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
  if err != nil {
    log.Fatal(err)
  }

  task, err := client.ConvertAudio.Create(context.Background(), suno.ConvertAudioParams{
    TaskID: "tsk_source_music",
    AudioID: "audio_reference",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = task
}
```

### ruby

#### Instalacja

```bash
gem install runapi-suno
```

```ruby
require "runapi/suno"

client = RunApi::Suno::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.convert_audio.create(
  task_id: "tsk_source_music",
  audio_id: "audio_reference"
)
```

### java

#### Instalacja

```kotlin
implementation("ai.runapi:runapi-suno")
```

```java
import ai.runapi.suno.SunoClient;
import ai.runapi.suno.types.ConvertAudioParams;
import ai.runapi.core.polling.TaskCreateResponse;

public final class Example {
  public static void main(String[] args) {
    SunoClient client = SunoClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    TaskCreateResponse task = client.convertAudio().create(
        ConvertAudioParams.builder()
        .taskId("tsk_source_music")
        .audioId("audio_reference")
            .build()
    );
  }
}
```

### php

#### Instalacja

```bash
composer require runapi-ai/suno
```

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use RunApi\Core\ClientOptions;
use RunApi\Suno\SunoClient;

$client = new SunoClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->convertAudio->create([
  "task_id" => "tsk_source_music",
  "audio_id" => "audio_reference"
]);
```

## Powiązane przewodniki

- [Uwierzytelnianie](https://runapi.ai/pl/docs/guides/authentication.md)
- [Szybki start](https://runapi.ai/pl/docs/guides/task-api/quickstart.md)

---

## Więcej od RunAPI

- [Strona główna](https://runapi.ai/pl/.md)
- [Katalog modeli](https://runapi.ai/pl/models.md)
- [Cennik](https://runapi.ai/pl/pricing.md)
- [Dostawcy](https://runapi.ai/pl/models)
- [Dokumentacja](https://runapi.ai/pl/docs/guides)
- [SDK](https://runapi.ai/pl/sdk.md)
- [CLI](https://runapi.ai/pl/cli.md)
- [Serwer MCP](https://runapi.ai/pl/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/pl/claude-code-vs-cursor.md)
- [Konfiguracja Cursor API](https://runapi.ai/pl/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/pl/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/pl/contact.md)
- [Kontakt](https://runapi.ai/pl/contact.md)
- [Regulamin](https://runapi.ai/pl/terms.md)
- [Prywatność](https://runapi.ai/pl/privacy.md)
- [Indeks witryny dla agentów](https://runapi.ai/llms.txt)

Kontakt: contact@runapi.ai

## Dane strukturalne

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "pl",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/pl",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/pl/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "pl",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/pl",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/plicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "pl",
    "@type": "TechArticle",
    "headline": "Suno Konwertuj audio",
    "description": "Użyj punktu końcowego convert audio, aby utworzyć asynchroniczne Zadanie (Task).",
    "url": "https://runapi.ai/pl/docs/api/suno/convert-audio",
    "mainEntityOfPage": "https://runapi.ai/pl/docs/api/suno/convert-audio"
  }
]
```
