> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# जनरेट किए गए आइटम पाएं

GET https://api.elevenlabs.io/v1/history

आपके जनरेट किए गए ऑडियो की सूची लौटाता है (जैसे टेक्स्ट टू स्पीच, स्पीच टू स्पीच, Studio, डबिंग)। म्यूज़िक और SFX जनरेशन शामिल नहीं हैं और उन्हें फ़िलहाल API से नहीं पाया जा सकता।

Reference: https://elevenlabs.io/docs/api-reference/history/list

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Query parameters

- `page_size` (integer, optional, default: 100) — ज़्यादा से ज़्यादा कितने हिस्ट्री आइटम लौटाने हैं। 1000 से ज़्यादा नहीं हो सकते, डिफ़ॉल्ट 100 है।
- `start_after_history_item_id` (string, optional, nullable) — किस ID के बाद फ़ेचिंग शुरू करनी है। हिस्ट्री आइटम के बड़े कलेक्शन में पेजिनेशन के लिए इस पैरामीटर का इस्तेमाल करें। यह पैरामीटर न देने पर, हिस्ट्री आइटम सबसे हाल ही में बनाए गए आइटम से शुरू करके उनकी निर्माण तिथि के घटते क्रम में फ़ेच किए जाएंगे।
- `voice_id` (string, optional, nullable) — फ़िल्टर की जाने वाली वॉइस की ID। सभी उपलब्ध वॉइस सूचीबद्ध करने के लिए आप [Get voices](/docs/api-reference/voices/search) endpoint इस्तेमाल कर सकते हैं।
- `model_id` (string, optional, nullable) — history items को फ़िल्टर करने के लिए इस्तेमाल किया गया search term। देने पर source ज़रूरी हो जाता है।
- `date_before_unix` (integer, optional, nullable) — इस तिथि से पहले के हिस्ट्री आइटम फ़िल्टर करने के लिए Unix टाइमस्टैम्प (इस तिथि को छोड़कर)।
- `date_after_unix` (integer, optional, nullable) — इस तिथि के बाद के हिस्ट्री आइटम फ़िल्टर करने के लिए Unix टाइमस्टैम्प (इस तिथि सहित)।
- `sort_direction` (enum, optional, nullable, default: desc) — results के लिए sort direction।
  - Allowed values: `asc`, `desc`
- `search` (string, optional, nullable) — फ़िल्टरिंग के लिए इस्तेमाल किया गया search term
- `source` (enum, optional, nullable) — generated history item का source
  - Allowed values: `TTS`, `STS`, `Flows`

## Response

### 200

सफल रिस्पॉन्स

- `history` (list of SpeechHistoryItemResponseModel, required) — स्पीच हिस्ट्री आइटम्स की सूची।
- `has_more` (boolean, required) — क्या प्राप्त करने के लिए और हिस्ट्री आइटम हैं।
- `last_history_item_id` (string, optional, nullable) — आखिरी हिस्ट्री आइटम की ID।
- `scanned_until` (integer, optional, nullable) — आखिरी हिस्ट्री आइटम का टाइमस्टैंप।

## Errors

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### SpeechHistoryItemResponseModel

- `history_item_id` (string, required) — हिस्ट्री आइटम की ID।
- `date_unix` (integer, required) — आइटम बनाए जाने का Unix टाइमस्टैम्प।
- `character_count_change_from` (integer, required) — कैरेक्टर काउंट में बदलाव की शुरुआती संख्या।
- `character_count_change_to` (integer, required) — कैरेक्टर काउंट में बदलाव की अंतिम संख्या।
- `content_type` (string, required) — जनरेट किए गए आइटम का कंटेंट टाइप।
- `state` (any, required)
- `request_id` (string, optional, nullable) — रिक्वेस्ट की ID।
- `voice_id` (string, optional, nullable) — इस्तेमाल की गई वॉइस का ID।
- `model_id` (string, optional, nullable) — मॉडल की ID।
- `voice_name` (string, optional, nullable) — वॉइस का नाम।
- `voice_category` (enum, optional, nullable) — वॉइस की कैटेगरी। इनमें से एक: 'premade', 'cloned', 'generated' या 'professional'।
  - Allowed values: `premade`, `cloned`, `generated`, `professional`
- `text` (string, optional, nullable) — ऑडियो आइटम बनाने के लिए इस्तेमाल किया गया टेक्स्ट।
- `settings` (map from string to any, optional, nullable) — हिस्ट्री आइटम की सेटिंग्स।
- `share_link_id` (string, optional, nullable) — शेयर लिंक की ID।
- `source` (enum, optional, nullable) — हिस्ट्री आइटम का स्रोत। TTS (टेक्स्ट टू स्पीच), STS (स्पीच टू टेक्स्ट), AN (ऑडियो नेटिव), प्रोजेक्ट्स, डबिंग, PlayAPI, PD (उच्चारण शब्दकोश) या ConvAI (एजेंट्स प्लेटफ़ॉर्म) में से कोई एक।
  - Allowed values: `TTS`, `STS`, `Projects`, `PD`, `AN`, `Dubbing`, `PlayAPI`, `ConvAI`, `VoiceGeneration`, `InVPC`, `Flows`, `VoicePreview`
- `alignments` (HistoryAlignmentsResponseModel, optional, nullable) — हिस्ट्री आइटम के अलाइनमेंट्स।
- `dialogue` (list of DialogueInputResponseModel, optional, nullable) — ऑडियो आइटम जनरेट करने के लिए इस्तेमाल किया गया डायलॉग (वॉइस और टेक्स्ट पेयर्स)। अगर यह सेट है, तो टॉप-लेवल `text` और `voice_id` फ़ील्ड खाली होंगे।
- `output_format` (string, optional, nullable) — वह आउटपुट फ़ॉर्मैट जिसमें ऑडियो मूल रूप से जनरेट किया गया था।

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### HistoryAlignmentsResponseModel

- `alignment` (HistoryAlignmentResponseModel, required) — टेक्स्ट का अलाइनमेंट।
- `normalized_alignment` (HistoryAlignmentResponseModel, required) — टेक्स्ट का नॉर्मलाइज़ किया गया संरेखण।

### DialogueInputResponseModel

- `text` (string, required) — डायलॉग इनपुट लाइन का टेक्स्ट।
- `voice_id` (string, required) — इस डायलॉग इनपुट लाइन के लिए इस्तेमाल की गई वॉइस का ID।
- `voice_name` (string, required) — इस डायलॉग इनपुट लाइन के लिए इस्तेमाल की गई वॉइस का नाम।

### ValidationErrorLocItems

### HistoryAlignmentResponseModel

- `characters` (list of string, required) — अलाइनमेंट में शामिल कैरेक्टर्स।
- `character_start_times_seconds` (list of double, required) — किरदारों के शुरुआती समय, सेकंड में।
- `character_end_times_seconds` (list of double, required) — कैरेक्टर्स के समाप्ति समय सेकंड में।

## Examples

**Response**

```json
{
  "history": [
    {
      "history_item_id": "ja9xsmfGhxYcymxGcOGB",
      "date_unix": 1714650306,
      "character_count_change_from": 17189,
      "character_count_change_to": 17231,
      "content_type": "audio/mpeg",
      "state": null,
      "request_id": "BF0BZg4IwLGBlaVjv9Im",
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "model_id": "eleven_multilingual_v2",
      "voice_name": "Rachel",
      "voice_category": "premade",
      "text": "Hello, world!",
      "settings": {
        "similarity_boost": 0.5,
        "stability": 0.71,
        "style": 0,
        "use_speaker_boost": true
      },
      "source": "TTS"
    }
  ],
  "has_more": true,
  "last_history_item_id": "ja9xsmfGhxYcymxGcOGB",
  "scanned_until": 1714650306
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/history"

querystring = {"date_after_unix":"1640995200","date_before_unix":"1640995200","model_id":"eleven_turbo_v2","search":"In the land far far away","sort_direction":"desc","source":"TTS"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/history?date_after_unix=1640995200&date_before_unix=1640995200&model_id=eleven_turbo_v2&search=In+the+land+far+far+away&sort_direction=desc&source=TTS")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```