Pindah dari DeepL
Pindahkan integrasi API DeepL ke VibeQL dengan mengubah URL server dan kunci di library klien DeepL Anda.
VibeQL menyediakan format API DeepL. Pertahankan kode dan library klien DeepL Anda. Ubah dua hal:
- URL server:
https://vibeql.com. - Kunci: kunci VibeQL dari halaman API.
Ubah URL server
client = deepl.DeepLClient(os.environ["VIBEQL_API_KEY"], server_url="https://vibeql.com")const client = new deepl.DeepLClient(process.env.VIBEQL_API_KEY, { serverUrl: "https://vibeql.com" });var client = new DeepLClient(apiKey, new DeepLClientOptions { ServerUrl = "https://vibeql.com" });DeepLClient client = new DeepLClient(apiKey, new DeepLClientOptions().setServerUrl("https://vibeql.com"));$client = new \DeepL\DeepLClient($apiKey, ['server_url' => 'https://vibeql.com']);// DeepL has no official Go library. Change the base URL in your HTTP code.
const baseURL = "https://vibeql.com" // was https://api.deepl.com or https://api-free.deepl.com
req, _ := http.NewRequest("POST", baseURL+"/v2/translate", body)
req.Header.Set("Authorization", "DeepL-Auth-Key "+os.Getenv("VIBEQL_API_KEY"))client = DeepL::Client.new(ENV.fetch('VIBEQL_API_KEY'), server_url: 'https://vibeql.com')Class Translator yang lebih lama memakai opsi yang sama. Dengan API Ruby tingkat modul yang lebih lama, setel config.host = 'https://vibeql.com' di DeepL.configure.
Jika Anda memanggil API melalui HTTP biasa, ganti https://api.deepl.com atau https://api-free.deepl.com dengan https://vibeql.com. Path dan parameter tetap sama.
Yang tetap sama
- Endpoint:
POST /v2/translate,POST /v2/document,POST /v2/document/{id},POST /v2/document/{id}/result,GET|POST /v2/usage,GET|POST /v2/languages, danGET /v3/languages. - Header
Authorization: DeepL-Auth-Keydan field lamaauth_key. - Nama field JSON, seperti
translations,detected_source_language,document_id,document_key,seconds_remaining, danbilled_characters. - Status dokumen:
queued,translating,done,error. - Kode status:
400,403,404,413,456,503. - Kode bahasa, termasuk
EN-US,PT-BR,ES-419, danZH-HANT. Lihat Bahasa.
Apa yang berbeda
| DeepL | VibeQL | |
|---|---|---|
| Minimum per dokumen | 50.000 karakter | Tidak ada. Dokumen memakai karakter yang dimilikinya. |
| Glosarium | Ya | Tidak. glossary_id diabaikan dan endpoint glosarium tidak tersedia. |
| Formalitas | Ya, untuk beberapa bahasa | Tidak. formality diabaikan dan supports_formality menjadi false. |
detected_source_language aktif /v2/translate |
Bahasa yang terdeteksi | source_lang Anda, atau EN jika Anda tidak mengisinya |
| API DeepL lainnya, seperti DeepL Write | Ya | Tidak tersedia |
| Format dokumen | Banyak | DOCX, PPTX, PDF, TXT |
| Harga | Lihat DeepL | Lihat Harga |
Terjemahan dihasilkan oleh model terjemahan AI, jadi pilihan katanya bisa berbeda dari keluaran DeepL untuk teks yang sama. Uji sebagian konten Anda sendiri sebelum Anda mengalihkan semua traffic.
Periksa pengalihan
curl https://vibeql.com/v2/usage \
-H "Authorization: DeepL-Auth-Key $VIBEQL_API_KEY"
Respons 200 dengan character_count dan character_limit menandakan bahwa URL dan key berfungsi.