DocumentationGetting started

Getting started

Your first XEDOC API request

Create an API key, check your model access and send a Responses API request with cURL or PowerShell.

Create your API key

#
  1. Create an account

    Register with a username and password, or continue with GitHub or Discord. Password registration asks you to repeat the password and solve the verification image.

  2. Add token credit

    Open Overview and choose Top up tokens. Select an amount, optionally apply a promo code, and continue to the secure NOWPayments crypto checkout. Tokens are credited after the payment reaches its final successful status.

  3. Create a key

    Open Dashboard → API keys, choose a name and create the key. Copy it when shown; the full secret is displayed only once.

  4. Check access

    API access is enabled automatically when you register. If an administrator disables access, generation returns 403; insufficient token balance returns 402. Check your account status and token balance in Overview.

Set a key for this terminal

#
Windowspowershell
$env:XEDOC_API_KEY = "sk-xedoc-YOUR_KEY"

Keep the key on the server

Use environment variables or your application’s secret store. Do not put a key in browser JavaScript, a mobile bundle, a public repository or a screenshot.

Verify the connection

#

Listing models checks authentication without generating content.

Windowspowershell
Invoke-RestMethod -Uri "https://api.xedoc.top/v1/models" -Headers @{ Authorization = "Bearer $env:XEDOC_API_KEY" }

The response contains a data array with the available canonical model IDs. Use those IDs exactly as returned.

Send a request

#
Windowspowershell
$body = @{
  model = "gpt-5.6-terra"
  input = "Reply with a short hello."
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api.xedoc.top/v1/responses" -Method Post -Headers @{ Authorization = "Bearer $env:XEDOC_API_KEY" } -ContentType "application/json" -Body $body

Generation deducts model-weighted tokens from your balance. Open Requests to inspect raw token usage and the actual charge separately. If the model is unavailable, select another ID from your current model list. Use the HTTP error reference to diagnose a rejected request.