Welcome
Create an API Key
- Log in to the Turing Portal
- Click your avatar in the upper-right corner and select API Key Management
- On the API Key Management page, click Create API Key
- Copy the generated API Key (save it now — it cannot be viewed again later)
- Start building your AI application
Request a Quota Increase
- Log in to the Turing Portal
- Click your avatar in the upper-right corner and select API Key Management
- In the Usage Management panel, click Request Quota Increase
The Turing Platform integrates a variety of mainstream model types. Visit the Model List to choose the model that best fits your use case. For your first API call, refer to Quick Start.
Environment Configuration
Before using the SDK, you need to configure the required environment variables. We recommend the following best practices for managing your configuration:
Do not hardcode your API Key directly in source code. Doing so can lead to:
- Security risks from exposing sensitive credentials
- Maintenance difficulties when switching between environments
Use environment variables or a configuration management system to manage your API Key.
API Endpoint
The Turing Platform provides multiple regional endpoints. Select the one that best suits your business needs:
China Region (Default)
TURING_API_BASE=https://live-turing.cn.llm.tcljd.com/api/v1
Europe Region
TURING_API_BASE=https://live-turing.eu.llm.tcljd.com/api/v1
North America Region
TURING_API_BASE=https://live-turing.us.llm.tcljd.com/api/v1
Asia Pacific (Singapore) Region
TURING_API_BASE=https://live-turing.sg.llm.tcljd.com/api/v1
Other Regions
- Other regions are not yet supported. If you need access, please contact the platform team.
Local Development Configuration
We recommend using a .env file to manage environment variables:
# .env example (China region)
TURING_API_BASE=https://live-turing.cn.llm.tcljd.com/api/v1
TURING_API_KEY=your-api-key
Best practices:
- Add the
.envfile to.gitignoreto prevent sensitive information from being committed to your repository - Use a
.env.examplefile as a template for team members - Use separate
.envfiles for different environments (development, testing, production)
Python Environment Configuration
For Python projects, you can use the python-dotenv package to automatically load your .env file:
pip install python-dotenv
from dotenv import load_dotenv
import os
# Load environment variables from the .env file
load_dotenv()
# Retrieve environment variables via os.getenv
api_key = os.getenv("TURING_API_KEY")
api_base = os.getenv("TURING_API_BASE")
Docker Environment Configuration
In a Docker environment, you can manage environment variables in the following ways:
- Pass them as
docker runcommand-line arguments:
docker run -e TURING_API_KEY=your-api-key -e TURING_API_BASE=https://live-turing.cn.llm.tcljd.com/api/v1 your-image
- Use an environment variable file:
docker run --env-file .env your-image
Docker Compose Configuration
Recommended project structure:
your-project/
├── .env # Local development environment variables (not committed to git)
├── .env.example # Environment variable template (committed to git)
├── docker-compose.yml # Development environment configuration
├── docker-compose.prod.yml # Production environment configuration
└── Dockerfile
Development environment example (docker-compose.yml):
version: "3.8"
services:
app:
build: .
env_file:
- .env
environment:
- NODE_ENV=development
volumes:
- .:/app
- /app/node_modules
ports:
- "3000:3000"
Production environment example (docker-compose.prod.yml):
version: "3.8"
services:
app:
image: your-registry/your-image:latest
env_file:
- .env.prod
environment:
- NODE_ENV=production
deploy:
replicas: 3
restart_policy:
condition: any
secrets:
- turing_api_key
secrets:
turing_api_key:
external: true
Usage:
# Development environment
docker compose up
# Production environment
docker compose -f docker-compose.yml -f docker-compose.prod.yml up
Production Environment Configuration
In production environments, we recommend:
- Using an environment variable management system (e.g., Kubernetes Secrets, AWS Secret Manager, Nacos, etc.)
- Using separate API Keys for different application scenarios to simplify management and access control
Once you have selected the appropriate SDK or API integration method and completed your configuration, you are ready to start exploring the Turing large model service.
Next Steps
- Overview: Platform capabilities and integration options
- API Reference: View the detailed API documentation