# Call a Genesis model

After completing this page, you will list the models available to your credential and receive a text response through Chat Completions.

## 1. Prepare connection information

Copy the complete base URL from the **Use** page in the Genesis console for the current environment. Prepare a personal access token or a service-account API key authorized for Genesis:

```bash
export GENESIS_BASE_URL='<Complete Genesis Base URL copied from the console>'
export GENESIS_ACCESS_TOKEN='<your-access-token>'
```

The base URL commonly already includes the version path. Keep the copied value unchanged: do not append `/v1` again, and do not use the console web URL or a Product API base URL.

## 2. Get a model ID

```bash
curl "$GENESIS_BASE_URL/models" \
  -H "Authorization: Bearer $GENESIS_ACCESS_TOKEN" \
  -H "Accept: application/json"
```

Choose a model that supports text chat from `data[].id` in the response and save its ID:

```bash
export MODEL_ID='<model-id-from-response>'
```

## 3. Send a message

```bash
curl -X POST "$GENESIS_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $GENESIS_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "'"$MODEL_ID"'",
    "messages": [
      {"role": "user", "content": "Explain data lineage in one sentence."}
    ],
    "max_tokens": 1024
  }'
```

The presence of `choices[0].message.content` in the response indicates that a model response was received. Save the request ID and actual model ID from the response for later troubleshooting.

## Next steps

- [View the complete Chat Completions quickstart](../api/genesis-model-api/getting-started/quickstart.md)
- [Choose models and capabilities](../api/genesis-model-api/getting-started/choose-model-capabilities.md)
- [Use a Genesis-compatible SDK](../sdk/genesis-compatible/index.md)
