Run CC docs

Quick Start

Get a key, send a request, and stream the response. Complete the setup in about one minute.

1 Get an API key

Choose a package from the product catalog and complete payment. Your API key will appear on screen immediately. This key is your primary access credential — store it securely as an environment variable.

Do not store this in source code
export RUNCC_API_KEY="runcc-..."

Keep your key on your server

Anything running on a user’s device can be read by that user. Call Run CC from your own server so your application can keep the key private.

2 Send your first request

Each example below sends the same request from a different client. Point the base URL to the Run CC gateway.

curl https://runccai.store/v1/chat/completions \
  -H "Authorization: Bearer $RUNCC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [
      {"role": "user", "content": "Halo dari Run CC!"}
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://runccai.store/v1"
)

response = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[
        {"role": "user", "content": "Halo dari Run CC!"}
    ]
)
print(response.choices[0].message.content)
import OpenAI from 'openai';

const openai = new OpenAI({
    apiKey: 'YOUR_API_KEY',
    baseURL: 'https://runccai.store/v1'
});

async function main() {
    const chatCompletion = await openai.chat.completions.create({
        messages: [{ role: 'user', content: 'Halo dari Run CC!' }],
        model: 'deepseek-v4.1-flash',
    });
    console.log(chatCompletion.choices[0].message.content);
}
main();

3 Stream the response

Streaming sends tokens as they are generated instead of waiting for the full answer. Use it for user-facing output and long responses to reduce timeout risk.

curl https://runccai.store/v1/chat/completions \
  -H "Authorization: Bearer $RUNCC_API_KEY" \
  -H "Content-Type: application/json" \
  -N \
  -d '{
    "model": "deepseek-v4.1-flash",
    "stream": true,
    "messages": [
      {"role": "user", "content": "Halo dari Run CC!"}
    ]
  }'
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://runccai.store/v1")

stream = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Halo dari Run CC!"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content is not None:
        print(chunk.choices[0].delta.content, end="")
import OpenAI from 'openai';

const openai = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://runccai.store/v1'});

async function main() {
    const stream = await openai.chat.completions.create({
        model: 'deepseek-v4.1-flash',
        messages: [{ role: 'user', content: 'Halo dari Run CC!' }],
        stream: true,
    });
    for await (const chunk of stream) {
        process.stdout.write(chunk.choices[0]?.delta?.content || '');
    }
}
main();

Long non-streaming requests are limited to 95 seconds

Non-streaming requests that exceed this limit are terminated by our network infrastructure. For long outputs (over about 1,000 tokens), use stream: true.