CoreSync Docs/Quickstart
API reference
GETTING STARTED01 / 07

Quickstart

Create an API key, choose an active model, and make your first request through the CoreSync OpenAI-compatible API

API base URLhttps://gt.coresyncapi.com
OpenAI base URLhttps://gt.coresyncapi.com/v1
Key formatsk_live_••••••••SECRET
ProtocolsREST · OpenAI · AsyncLIVE
01
AUTHENTICATION

Create an API key

Generate a key in your CoreSync dashboard and keep it in an environment variable

Terminal
export CORESYNC_API_KEY="sk_live_..."
02
MODEL DISCOVERY

Confirm an active model ID

Query the catalog first so production requests always use a currently active route

GET /v1/models
curl https://gt.coresyncapi.com/v1/models \
  -H "Authorization: Bearer $CORESYNC_API_KEY"
GET/v1/modelsReturns active model IDs available to your account
03
CHAT COMPLETIONS

Make your first request

Use the same base URL and authentication pattern from your preferred stack

cURL
curl https://gt.coresyncapi.com/v1/chat/completions \
  -H "Authorization: Bearer $CORESYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v3.2",
    "messages": [
      {"role": "user", "content": "Hello from CoreSync AI"}
    ]
  }'
04
RESPONSE

Read the response

The generated message is returned with completion state and token usage

200 OK · application/json
{
  "id": "chatcmpl-abc123",
  "choices": [{
    "message": {
      "role": "assistant",
      "content": "Hello! How can I help?"
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 8,
    "total_tokens": 20
  }
}
05
TROUBLESHOOTING

Resolve common errors

Use the status code to identify the fastest next action

401Authentication

Send the complete bearer key

402Credit required

Add prepaid credit to the account

404Route not found

Confirm endpoint and active model ID

422Invalid request

Validate JSON, model, and messages

429Rate limited

Retry with bounded backoff

503Temporarily unavailable

Retry with bounded backoff

06
KEEP BUILDING

Choose your next route

Move from the first request to the API surface you need

Copied to clipboard