---
title: Gemini Omni Utwórz audio | RunAPI
description: Użyj punktu końcowego create audio, aby otrzymać wynik w tej samej odpowiedzi.
url: https://runapi.ai/pl/docs/api/gemini-omni/create-audio.md
canonical: https://runapi.ai/pl/docs/api/gemini-omni/create-audio
locale: pl
---

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

# Gemini Omni Utwórz audio

## Omówienie

Użyj punktu końcowego create audio i odczytaj wynik z tej samej odpowiedzi.

### 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. Odczytaj wynik z treści pomyślnej odpowiedzi.

## Punkt końcowy

POST /api/v1/gemini_omni/create_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.

- [gemini-omni-audio](https://runapi.ai/pl/models/gemini-omni/audio)

## Schemat żądania

Wysyłaj wyłącznie pola zadeklarowane dla tego punktu końcowego.

### gemini-omni-audio

```json
{
  "audio_id": {
    "description": "Tożsamość głosowa używana dla presetu audio.",
    "required": true,
    "type": "string"
  },
  "example_dialogue": {
    "description": "Przykładowy dialog ilustrujący styl głosu.",
    "length": true,
    "max": 120,
    "type": "string"
  },
  "name": {
    "description": "Wyświetlana nazwa ustawienia wstępnego audio.",
    "length": true,
    "max": 210,
    "required": true,
    "type": "string"
  },
  "voice_description": {
    "description": "Cechy głosu, takie jak wysokość, barwa lub akcent.",
    "length": true,
    "max": 20000,
    "type": "string"
  }
}
```

## Odpowiedź sukcesu

HTTP 200 - POST /api/v1/gemini_omni/create_audio

### Schemat odpowiedzi

```json
{
  "properties": {
    "audio": {
      "properties": {
        "id": {
          "description": "Utworzony identyfikator presetu audio.",
          "type": "string"
        },
        "name": {
          "description": "Wyświetlana nazwa ustawienia wstępnego audio.",
          "type": "string"
        }
      },
      "required": [
        "id"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "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": {
      "description": "Utworzony identyfikator presetu audio.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "audio",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Przykład odpowiedzi

```json
{
  "audio": {
    "id": "aud_reference_narrator",
    "name": "Studio Narrator"
  },
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "aud_reference_narrator"
}
```

## Błędy

HTTP 401 - POST /api/v1/gemini_omni/create_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 400 - POST /api/v1/gemini_omni/create_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": {
    "audio_id": [
      "is required"
    ]
  }
}
```

## Błędy

HTTP 402 - POST /api/v1/gemini_omni/create_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/gemini_omni/create_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/gemini_omni/create_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/gemini_omni/create_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/gemini_omni/create_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/gemini_omni/create_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"
}
```

## 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/gemini_omni/create_audio \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"audio_id":"achernar","name":"Studio Narrator","voice_description":"A calm and clear narration voice.","example_dialogue":"Welcome to the studio."}'
```

### javascript

#### Instalacja

```bash
npm install @runapi.ai/gemini-omni
```

```javascript
import { GeminiOmniClient } from "@runapi.ai/gemini-omni";

const client = new GeminiOmniClient({ apiKey: process.env.RUNAPI_API_KEY });
const result = await client.createAudio.run({
  "audio_id": "achernar",
  "name": "Studio Narrator",
  "voice_description": "A calm and clear narration voice.",
  "example_dialogue": "Welcome to the studio."
});
```

### python

#### Instalacja

```bash
pip install runapi-gemini-omni
```

```python
import os
from runapi.gemini_omni import GeminiOmniClient

client = GeminiOmniClient(api_key=os.environ["RUNAPI_API_KEY"])
result = client.create_audio.run(
  audio_id="achernar",
  name="Studio Narrator",
  voice_description="A calm and clear narration voice.",
  example_dialogue="Welcome to the studio."
)
```

### go

#### Instalacja

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

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  geminiomni "github.com/runapi-ai/gemini-omni-sdk/go/geminiomni"
)

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

  result, err := client.CreateAudio.Run(context.Background(), geminiomni.CreateAudioParams{
    AudioID: geminiomni.AudioVoice("achernar"),
    Name: "Studio Narrator",
    VoiceDescription: "A calm and clear narration voice.",
    ExampleDialogue: "Welcome to the studio.",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
```

### ruby

#### Instalacja

```bash
gem install runapi-gemini-omni
```

```ruby
require "runapi/gemini_omni"

client = RunApi::GeminiOmni::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
result = client.create_audio.run(
  audio_id: "achernar",
  name: "Studio Narrator",
  voice_description: "A calm and clear narration voice.",
  example_dialogue: "Welcome to the studio."
)
```

### java

#### Instalacja

```kotlin
implementation("ai.runapi:runapi-gemini-omni")
```

```java
import ai.runapi.geminiomni.GeminiOmniClient;
import ai.runapi.geminiomni.types.CreateAudioParams;
import ai.runapi.geminiomni.types.CreateAudioResponse;

public final class Example {
  public static void main(String[] args) {
    GeminiOmniClient client = GeminiOmniClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    CreateAudioResponse result = client.createAudio().run(
        CreateAudioParams.builder()
        .audioId("achernar")
        .name("Studio Narrator")
        .voiceDescription("A calm and clear narration voice.")
        .exampleDialogue("Welcome to the studio.")
            .build()
    );
  }
}
```

### php

#### Instalacja

```bash
composer require runapi-ai/gemini-omni
```

```php
<?php

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

use RunApi\Core\ClientOptions;
use RunApi\GeminiOmni\GeminiOmniClient;

$client = new GeminiOmniClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$result = $client->createAudio->run([
  "audio_id" => "achernar",
  "name" => "Studio Narrator",
  "voice_description" => "A calm and clear narration voice.",
  "example_dialogue" => "Welcome to the studio."
]);
```

## 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": "Gemini Omni Utwórz audio",
    "description": "Użyj punktu końcowego create audio, aby otrzymać wynik w tej samej odpowiedzi.",
    "url": "https://runapi.ai/pl/docs/api/gemini-omni/create-audio",
    "mainEntityOfPage": "https://runapi.ai/pl/docs/api/gemini-omni/create-audio"
  }
]
```
