curl --request POST \
--url https://api.promptlayer.com/api/public/v2/tables \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"title": "Regression suite"
}
'{
"success": true,
"table": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": 123,
"title": "<string>",
"folder_id": 123,
"sheet_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sheet_row_counts": {}
},
"message": "<string>",
"default_sheet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": 123,
"title": "<string>",
"index": 123,
"row_count": 123,
"version_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Table
Create a Table from the public API.
POST
/
api
/
public
/
v2
/
tables
curl --request POST \
--url https://api.promptlayer.com/api/public/v2/tables \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"title": "Regression suite"
}
'{
"success": true,
"table": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": 123,
"title": "<string>",
"folder_id": 123,
"sheet_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sheet_row_counts": {}
},
"message": "<string>",
"default_sheet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": 123,
"title": "<string>",
"index": 123,
"row_count": 123,
"version_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create a Table with a default
Sheet 1, a Column A text column, and one empty row when create_default_sheet is true (default).
Pass create_default_sheet: false to create a table without a default sheet. The response omits default_sheet and sheet_count is 0.
Workspace and folders
The table is created in the workspace associated with your API key. Passfolder_id to create the table inside a registry folder in that workspace.
When title is omitted, PromptLayer generates an Untitled Table name.Authorizations
Body
application/json
Table title. Defaults to a unique 'Untitled Table' name if omitted.
Folder to place the table in.
When true (default), creates Sheet 1 with a Column A text column and one empty row. When false, creates an empty table with no sheets.
Response
Table created. When create_default_sheet is true (default), the response includes default_sheet and table.sheet_count is 1. When create_default_sheet is false, default_sheet is omitted and table.sheet_count is 0.
A Table — a versioned, multi-sheet table that can run LLM columns to generate or evaluate data at scale.
Show child attributes
Show child attributes
The default sheet created when create_default_sheet is true. Omitted when create_default_sheet is false.
Show child attributes
Show child attributes
Was this page helpful?

