Getting startedBeginnersUpdated

Getting Started

Get an API key and choose an endpoint, then make your first request. Call the HTTP API or configure a client.

1. Register and copy an API key

Open Register. After you sign in, copy a key from API Keys. Put the key only in that client's own config or login command. Do not commit it, screenshot it, or paste it into chat. If it leaks, click "Rotate Key" on the same page. The old key stops working immediately.

2. Choose an endpoint

Open Endpoint selection, pick an endpoint for each model family you will use, and save. Some models exist only on a named endpoint. Claude Fable 5, for example, requires the Claude Max 20x subscription endpoint. A request fails when that family has no selection. It does not pick one for you.

Send your first API request

In your terminal, set ICODEEASY_API_KEY to your site API key. This example uses deepseek-flash. First select a DeepSeek endpoint that accepts direct HTTP and Chat Completions, or change the model ID to one your selected endpoint supports.

bash
curl -sS https://api.icodeeasy.cc/v1/chat/completions \
  -H "Authorization: Bearer $ICODEEASY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"model":"deepseek-flash","messages":[{"role":"user","content":"Say hello."}],"stream":false}'

After HTTP 200, read the reply from choices[0].message.content.

Generate your first image or video

  • Image. Send a prompt to POST /v1/images/generations?sync=1. After HTTP 200, open data[0].url. With ?async=1, save the returned task_id, poll GET /v1/images/tasks/{task_id} until completed, and read result_url. See the image request example.
  • Video. Create a job with POST /v1/videos/generations. After HTTP 202, save task_id and poll status_url. When the job reaches succeeded, download it via content_url. See the video quickstart.

Configure a client

Primary API address:

text
https://api.icodeeasy.cc

If that host is slow or times out from your network, switch the host and keep the same path and key:

text
https://jp.icodeeasy.cc
https://sg.icodeeasy.cc

Each client uses a different field. Follow its guide. Do not paste one client's config into another:

One key can be used in all of these clients. See one key, multiple clients.

Send a chat message from the client and check that it replies.

Check your request

After receiving a response, use Request logs to confirm the model, status, and charge. See the pricing page and pricing, balance, and usage for rates.

Install Node.js first if you do not have it: environment setup. For 401, 429, or a connection that never completes, use connection and recovery.