Google AI Studio
Google AI Studio provides Gemini API keys. Availability, model access, quotas, safety restrictions, and billing depend on your Google account and region.
1. Open the key page
Sign in to Google AI Studio API keys.
2. Create or select a project
Use the project selector shown by Google AI Studio. If prompted, accept the applicable Google AI terms and configure billing or limits required for the model you want to use.
3. Create and copy the key
Choose Create API key, select the intended project, and copy the key once. Google may provide a standard AIza... key or a newer authorization key beginning with AQ.; both are accepted by DuskTranslate. Treat either format as a secret.
4. Use it in DuskTranslate
Open a project, choose a Google AI Studio model, paste the key into the API key field, and start a translation. The key is not included in the saved project or cloud snapshot.
Read Google's API-key documentation for current key restrictions, quota, and billing details.
OpenRouter
OpenRouter provides one API endpoint for models from multiple providers. Model availability, free-tier limits, rate limits, and provider routing can change, so check the current model page before relying on a model.
1. Open your key settings
Sign in to OpenRouter key settings.
2. Create a key
Choose Create key, give it a recognizable name such as DuskTranslate browser, and set the smallest spending limit that fits your testing.
3. Choose an available model
Review the OpenRouter models list. DuskTranslate's model menu only includes the models configured by this build; a provider can still reject a model because of quota, eligibility, or safety rules.
4. Use it in DuskTranslate
Select an OpenRouter model, paste the key into the API key field, and translate. The request is sent directly to OpenRouter from the browser.
Read OpenRouter's API documentation for current authentication and usage information.
OpenAI and Claude
Create a provider API key in your OpenAI or Anthropic developer account. A ChatGPT or Claude chat subscription is separate from API billing. Paste your key into the editor, open Import, and select OpenAI or Claude (Anthropic). Choose Import all models, then select a text-generation model supported by your account. You can also enter an exact model ID manually.
OpenAI uses the Chat Completions API; Claude uses the Messages API. Not every model in a provider's catalog supports these APIs. Requests go directly from your browser to the provider; keys are not saved in projects.
Custom API URLs
Open Import and choose Custom (OpenAI-compatible). Enter the HTTPS API base URL, including its version path where required, for example https://your-provider.example/v1. Use a key issued for that service. Import its models or enter the model ID from its documentation.
The service receives your key, prompt, and translation text. Only connect to a service you trust. Custom URLs must support /chat/completions streaming and browser requests (CORS); model import also needs /models. DuskTranslate does not proxy requests or bypass a provider's browser restrictions. Custom connection settings must be entered again when the editor is reopened.
Safety checklist
- Use provider-side restrictions and low spending limits where available.
- Do not put a provider key in HTML, JavaScript, Git, screenshots, or a shared project backup.
- Revoke or rotate a key immediately if it appears in a public place.
- Remember that uploaded books and prompts are sent to the provider when you start a translation. Only process content you are authorized to use.
- For a shared computer, leave "Remember me" unchecked and clear the editor session when finished.
Troubleshooting
Nothing is returned
Check the selected provider, model availability, key format, browser network access, provider quota, and safety response. Try a shorter chapter or switch to another configured model. DuskTranslate cannot bypass provider limits.
The key works elsewhere but not here
Confirm that the model belongs to the selected provider and that the key is allowed to make browser-originated requests. Rotate the key if it may have been exposed.