ArkAgentic
Back

Set Up Guide

Everything you need to go from a new API key to a successful first request.

Integration Flow

  1. 1

    Step 01 | Credential Preparation

    Go to API Keys to create a key and securely store the full key string.

  2. 2

    Step 02 | Base Configuration

    Replace your client Base URL with https://gateway.arkagentic.com/v1 (OpenAI SDK compatible).

  3. 3

    Step 03 | Model Selection

    Go to Model Hub and choose the required model ID for your request body.

  4. 4

    Step 04 | Call Verification

    Go to Prepaid Top-up to ensure available balance, then run the code sample below.

Request Examples

curl https://gateway.arkagentic.com/v1/chat/completions \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ark-gpt-4o",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello"}
    ],
    "stream": false
  }'

Response (200 OK)

● Status: 200 OK
{
  "id": "chatcmpl-ark12345",
  "object": "chat.completion",
  "created": 1700000000,
  "model": "ark-gpt-4o",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "ArkAgentic API connection successful. Ready to process requests."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 11,
    "total_tokens": 20
  }
}

Troubleshooting

Error CodeCommon CauseHow to Fix
401 Invalid API keyMasked key copied, typo, or key is disabledCopy full key again and ensure status is Active
400 Model not supportedModel id typo or wrong host/pathUse any enabled model from Model Hub (for example, ark-gpt-4o) and endpoint https://gateway.arkagentic.com/v1/chat/completions
402 Insufficient balanceAccount balance is too lowGo to Prepaid Top-up and recharge, then retry
429 / 5xxTemporary upstream/network issue or rate limitingRetry with exponential backoff and keep request id for support