# Bắt đầu nhanh

> Tạo tài khoản, nạp tiền, tạo API key và gọi model đầu tiên qua API Gateway trong vài phút, bằng curl, SDK hoặc Claude Code.

Trang gốc: https://goiapi.com/docs/bat-dau-nhanh

Bạn cần ba thứ: tài khoản có số dư, một API key, và địa chỉ API `https://api.goiapi.com`. Sau đó gọi model như gọi API của OpenAI hoặc Anthropic.

## 1. Tạo tài khoản

[Đăng ký](https://goiapi.com/dang-ky) bằng email hoặc Google, rồi xác minh email.

## 2. Nạp tiền

Vào **Nạp tiền** trong dashboard, chọn số tiền, quét mã QR bằng app ngân hàng. Tiền vào ví khi hệ thống nhận được chuyển khoản. Giá từng model xem ở [Bảng giá](https://goiapi.com/bang-gia).

## 3. Tạo API key

Vào **API Keys**, bấm tạo key và copy ngay: key chỉ hiện một lần. Key có dạng `sk-…`.

## 4. Gọi thử

Chuẩn OpenAI:

```bash
curl https://api.goiapi.com/v1/chat/completions \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-haiku-5-5", "messages": [{"role": "user", "content": "Xin chào"}]}'
```

Chuẩn Anthropic:

```bash
curl https://api.goiapi.com/v1/messages \
  -H "x-api-key: <API_KEY>" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-haiku-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Xin chào"}]}'
```

Đổi `claude-haiku-5-5` thành model bạn muốn dùng, xem tên ở [Models](https://goiapi.com/models) hoặc gọi [`GET /v1/models`](https://goiapi.com/docs/danh-sach-model).

## Tiếp theo

- Dùng với công cụ: [Claude Code](https://goiapi.com/docs/tich-hop/claude-code), [Cursor](https://goiapi.com/docs/tich-hop/cursor), [Cline / Roo Code](https://goiapi.com/docs/tich-hop/cline), [Codex CLI](https://goiapi.com/docs/tich-hop/codex).
- Gọi từ code: [SDK OpenAI](https://goiapi.com/docs/tich-hop/openai-sdk), [SDK Anthropic](https://goiapi.com/docs/tich-hop/anthropic-sdk).
- Khi gặp lỗi: [Mã lỗi](https://goiapi.com/docs/ma-loi).
