Skip to content

Get API Key

Generate a New API Key

  1. Log in to your account at newtcode.cc
  2. Navigate to Tokens in the sidebar
  3. Click Create Token
  4. Give your token a name (e.g., "Claude Code", "Chatbox")
  5. Click Submit
  6. Copy the generated API key immediately — it won't be shown again!

Important

Store your API key securely. Do not share it publicly or commit it to version control.

API Base URL

Use the following base URL for all API requests:

https://newtcode.cc

Test Your API Key

You can verify your key works with a simple curl command:

bash
curl https://newtcode.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 100
  }'

If you receive a valid response, your API key is working correctly.

Manage API Keys

  • You can create multiple API keys for different tools or projects
  • Disable or delete keys from the Tokens page
  • Monitor usage per key in the dashboard

Next Steps

Powered by NewtCode