> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gpt-de-babi.perfproai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Démarrage rapide

> Créez une session, une conversation et envoyez un message.

Utilisez d'abord les identifiants **sandbox** affichés une seule fois dans votre console partenaire.

Le sandbox accepte jusqu'à **50 nouveaux messages par jour**, avec **20 requêtes par minute** et **2 traitements simultanés**. Réutiliser le même `client_message_id` avec le même contenu ne consomme pas un message supplémentaire.

## 1. Créer un token utilisateur

```bash theme={null}
export GPT_DE_BABI_BASE_URL="https://gpt-de-babi.perfproai.com"
export GPT_DE_BABI_CLIENT_ID="gdb_sandbox_REMPLACEZ_MOI"
export GPT_DE_BABI_CLIENT_SECRET="REMPLACEZ_MOI"

curl --request POST "$GPT_DE_BABI_BASE_URL/api/partners/v1/tokens" \
  --user "$GPT_DE_BABI_CLIENT_ID:$GPT_DE_BABI_CLIENT_SECRET" \
  --header "Content-Type: application/json" \
  --data '{
    "external_user_id": "usr_8f32a9",
    "locale": "fr-CI",
    "timezone": "Africa/Abidjan"
  }'
```

Copiez `access_token` depuis la réponse dans `USER_TOKEN`.

## 2. Créer une conversation

```bash theme={null}
export USER_TOKEN="COLLEZ_LE_TOKEN_COURT"

curl --request POST "$GPT_DE_BABI_BASE_URL/api/partners/v1/conversations" \
  --header "Authorization: Bearer $USER_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"title":"Démarches administratives"}'
```

## 3. Envoyer un message

```bash theme={null}
export CONVERSATION_ID="UUID_RETOURNE"

curl --request POST \
  "$GPT_DE_BABI_BASE_URL/api/partners/v1/conversations/$CONVERSATION_ID/messages" \
  --header "Authorization: Bearer $USER_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "client_message_id": "msg_001",
    "message": "Où renouveler mon passeport à Abidjan ?",
    "location": {"city":"Abidjan","commune":"Cocody"}
  }'
```

Une réponse `202` contient un `turn_id`. Interrogez `/api/partners/v1/turns/{turn_id}` jusqu'à `status: completed`, ou utilisez le [streaming WebSocket](/websocket).
