Skip to main content
curl --request POST \
  --url https://app.langtrace.ai/api/project \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: 6bd254a6615f48ea0da16823520db8efa4caa4186f62385fbd0f03324c7edcb5' \
  --data '{
    "name": "My Project",
    "description": "Your Project Description",
    "teamId": "clxw064em0004dpukky3d55lw",
    "createDefaultTests": true
  }'
{
  "id": "clxyvlimf0001ig5bwss7qhrk",
  "name": "My Project",
  "description": "Your Project Description",
  "teamId": "clxw064em0004dpukky3d55lw",
  "createdAt": "2024-06-28T15:56:25.096Z",
  "updatedAt": "2024-06-28T15:56:25.096Z",
}
You can find the teamId when you click on Settings -> Team. You will need a team level API key which can be generated on the same page by clicking Generate API Key.
A complete list of supported parameters for the POST project endpoint is provided below.
teamId
string
required
ID of your team. This can be found on the langtrace ui.
name
string
Name of the project.
description
string
Descripton of the project you are creating.
createDefaultTests
boolean
If true, default tests will be created for the project.
id
string
Project id
name
string
Project name
description
string
Project description
createdAt
string
ISO 8601 date-time string
updatedAt
string
ISO 8601 date-time string
error
object
curl --request POST \
  --url https://app.langtrace.ai/api/project \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: 6bd254a6615f48ea0da16823520db8efa4caa4186f62385fbd0f03324c7edcb5' \
  --data '{
    "name": "My Project",
    "description": "Your Project Description",
    "teamId": "clxw064em0004dpukky3d55lw",
    "createDefaultTests": true
  }'
{
  "id": "clxyvlimf0001ig5bwss7qhrk",
  "name": "My Project",
  "description": "Your Project Description",
  "teamId": "clxw064em0004dpukky3d55lw",
  "createdAt": "2024-06-28T15:56:25.096Z",
  "updatedAt": "2024-06-28T15:56:25.096Z",
}
I