Eligible new accounts: $1 API credit, no card required. Email verification and device checks apply. Daily site-wide limit: $20 (resets at 00:00 Beijing time). Once exhausted, registration remains available without credit. Offer details →
DeepSeek API integration guide
Connect to GirtAI with cURL, Python, Node.js and compatible clients. Learn authentication, model discovery, streaming and error handling.
1. Create an account and API key
Register with your email, verify the email address, and create an API key in the console. Use a GirtAI-issued key, not a DeepSeek-issued key. Keep keys on your server or in environment variables; never put them in public JavaScript or a public repository.
2. Select an available model
The examples use deepseek-flash. The other model identifier shown on this site is deepseek-v4-pro. Request GET https://girtai.com/v1/models with your API key to check the models currently available to your account. Model availability can change.
3. Configure your client
For the OpenAI SDK, set the base URL to https://girtai.com/v1. The chat endpoint is POST /v1/chat/completions. Use Authorization: Bearer YOUR_GIRTAI_API_KEY. Anthropic-compatible messages use POST /v1/messages and also support the x-api-key header. This is protocol compatibility, not a promise that every provider feature is supported.
4. Python and Node.js setup
Install the OpenAI client with pip install openai for Python, or npm install openai for Node.js. Select the corresponding example below. Store the key in an environment variable. The Node.js example reads ALVO_API_KEY; replace the placeholder in the Python or cURL example with a securely loaded key.
5. Streaming responses
The examples enable stream: true. Read the stream incrementally rather than parsing the entire response as one JSON document. Some chunks have no text content, so check for a non-empty choices array and content before displaying it. Cancel requests when users leave the conversation.
6. Diagnose errors safely
For 400 errors, check the model, JSON body and required fields. For 401, check the key and authentication header. For 403, check account and key status. For 429, respect Retry-After when provided and use bounded retries with backoff. Inspect the returned error body for the exact reason. Do not retry authentication or validation errors indefinitely, and never log API keys.
7. Understand billing
Compare input cache-hit, input cache-miss and output rates separately. Prices on the pricing page are in USD per one million tokens, not per request. Flash has peak and off-peak rates. Pro currently has the same GirtAI rate in both periods. Check the console and the pricing page before sending large workloads.
8. Service identity and support
GirtAI is an independent API gateway operated by ALVODATA TECH CO., LIMITED. It is not affiliated with or endorsed by DeepSeek. The service is in public beta; do not infer a service-level guarantee from an example. Contact [email protected] for integration and account questions.
Quick start
Create an API key and make your first request in minutes.