> For the complete documentation index, see [llms.txt](https://docs.apismart.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apismart.ai/welcome-to-apismart/quick-start.md).

# Quick Start

Get started with ApiSmart in minutes. Create an API Key, find an available model, and send your first text, image, or video API request.

Get up and running with ApiSmart in just a few steps.

This guide will show you how to create an API Key, find an available model, and send your first API request.

### 🚀 Before You Start

Make sure you have:

* An ApiSmart account
* Sufficient wallet balance for the model you want to use
* An API Key

If you haven't created an account or added funds yet, see [**Create and Access Your Account**](/account-and-wallet/create-and-access-your-account.md) and [**Add Funds and Understand Wallet Credits**](/account-and-wallet/add-funds-and-understand-wallet-credits.md).

***

### 🔑 Step 1: Create an API Key

Sign in to the ApiSmart Console and go to:

**Console → API Keys**

Click **Create API Key** and create a credential for your application.

Your API Key is used to authenticate API requests.

Throughout this documentation, we use:

`<your-api-key>`

Replace this placeholder with your actual API Key when sending a request.

> Keep your API Key secure. Do not expose it in public repositories, browser-side code, or other publicly accessible locations.

For key management and security best practices, see [**API Keys**](/welcome-to-apismart/api-keys.md).

***

### 🔗 Step 2: Configure the API

The standard ApiSmart API Base URL is:

`https://gw.apismart.ai/v1`

Authenticate requests using the `Authorization` header:

```http
Authorization: Bearer <your-api-key>
```

For JSON requests, also include:

```http
Content-Type: application/json
```

***

### 🧩 Step 3: Find a Model

Before making a request, you can retrieve the current model list:

```bash
curl https://gw.apismart.ai/v1/models \
  -H "Authorization: Bearer <your-api-key>"
```

Example response:

```json
{
  "object": "list",
  "data": [
    {
      "id": "doubao-seedream-5-0",
      "object": "model",
      "owned_by": "api-gateway"
    },
    {
      "id": "deepseek-v4-flash",
      "object": "model",
      "owned_by": "api-gateway"
    }
  ]
}
```

Use the value returned in `data[].id` as the `model` parameter in your API request.

> **Model IDs must match exactly.**\
> Pay attention to periods (`.`), hyphens (`-`), and version numbers.

The Models API may return models that are not enabled for every API Key. If a request returns `403 model_not_allowed`, the selected model is not currently available to your API Key.

For more information, see [**Models and Model IDs**](/models-and-pricing/models-and-model-ids.md).

***

### 💬 Step 4: Send Your First Request

The fastest way to test your integration is with the Chat Completions API.

Send a request to:

`POST /v1/chat/completions`

```bash
curl https://gw.apismart.ai/v1/chat/completions \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {
        "role": "user",
        "content": "Hello! Please introduce yourself."
      }
    ]
  }'
```

If the request succeeds, the API returns a response generated by the selected model.

You have now completed your first ApiSmart API request.

***

### 🖼️ Optional: Try Image Generation

To generate an image, use:

`POST /v1/images/generations`

Example:

```bash
curl https://gw.apismart.ai/v1/images/generations \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0",
    "prompt": "A mountain village at sunrise, watercolor style",
    "size": "2K",
    "watermark": false
  }'
```

Image generation is synchronous, so the connection remains open until generation completes.

For longer-running requests, set your client timeout to at least **90 seconds**.

For supported parameters, reference images, image editing, and streaming, see [**Image Generation API**](/api-guides/image-generation-api.md).

***

### 🎬 Optional: Try Video Generation

Video generation uses asynchronous tasks.

Create a task with:

`POST /v1/video/tasks`

```bash
curl https://gw.apismart.ai/v1/video/tasks \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "happyhorse-1.0",
    "prompt": "A miniature city at night with a train moving through the streets",
    "duration": 5,
    "size": "720P"
  }'
```

The API returns a task ID.

Use it to check the task status:

```bash
curl https://gw.apismart.ai/v1/video/tasks/<task_id> \
  -H "Authorization: Bearer <your-api-key>"
```

Continue checking until the task reaches a final status such as `succeeded` or `failed`.

> For video requests, explicitly specify parameters such as `resolution` and `duration` when applicable. These values can affect billing.

For model-specific parameters and supported workflows, see [**Video Generation API**](/api-guides/video-generation-api.md).

***

### ✅ You're Ready to Build

You now know how to:

1. Create an API Key
2. Configure the ApiSmart API
3. Retrieve available model IDs
4. Send a Chat Completions request
5. Try image or video generation

Continue with the documentation that matches your workflow:

* [**API Keys**](/welcome-to-apismart/api-keys.md) — Manage and secure your credentials
* [**Models and Model IDs**](/models-and-pricing/models-and-model-ids.md) — Find supported models
* [**Model Pricing and Billing**](/models-and-pricing/model-pricing-and-billing.md) — Understand model costs
* [**API Basics**](/api-guides/api-basics.md) — Learn common API conventions
* [**Chat Completions API**](/api-guides/chat-completions-api.md) — Build with text models
* [**Image Generation API**](/api-guides/image-generation-api.md) — Generate and edit images
* [**Video Generation API**](/api-guides/video-generation-api.md) — Create video generation workflows
* [**Response Modes**](/api-guides/response-modes.md) — Learn about standard, streaming, and asynchronous responses
