Skip to main content
Use the Tables REST API or PromptLayer MCP server when scripts, CI jobs, or coding agents should create Tables, add sheets and columns, import data, or queue recalculation work. Read these warnings before automating in a production workspace.
Creates are hard to undo through agents. The PromptLayer MCP server does not yet expose Table create, update, or delete tools. When you automate through the REST API, Delete Table, Delete Sheet, and Delete Column soft-delete resources, but agent workflows rarely call them. Treat every create, import, and column configuration as permanent until you have validated it in a non-production workspace.
Computed columns incur provider costs. Recalculating prompt, workflow, LLM assertion, AI extraction, and conversation simulator columns sends real requests to LLM providers. Each run uses your workspace provider credentials and counts toward usage and billing. Configure provider API keys under Settings → Custom Providers and Models before queueing large runs.

Test in a non-production workspace first

Run new automation against a development or staging workspace before pointing agents at production data. Create a small Table with a few rows, confirm column mappings and scores, then scale up imports and recalculation scopes. When moving a workflow from legacy Evaluations or Datasets, follow Migrate from Evaluations and Datasets. To copy or migrate a Table to another workspace, follow Copying and Migrating Tables.

Provider API keys

Computed columns that call LLM providers require workspace provider credentials. Without them, prompt and LLM evaluation columns fail at runtime. Configure keys in Settings → Custom Providers and Models for each provider your columns use. See Supported Providers for provider-specific setup. When running code locally with the PromptLayer SDK, set provider keys as environment variables (for example, OPENAI_API_KEY). Table recalculation runs on PromptLayer infrastructure and uses workspace provider settings instead.

Compute cost and large runs

Recalculation operations can target a single cell, selected rows, a column, stale cells, or an entire sheet. Wider scopes execute more computed columns and may trigger many provider requests. When an operation affects many cells, Create operation may return requires_confirmation with a confirmation_token and affected_cell_count. Pass the token in a follow-up request only after you intend to proceed. Agents should respect this confirmation step instead of blindly retrying. Prompt columns also record per-cell cost and latency metrics. Use History and Analytics to review spend after large runs.

REST API and MCP

Use the REST API for full Tables lifecycle management, including delete endpoints for Tables, sheets, and columns. Use the PromptLayer MCP server when a coding agent should work with PromptLayer workspace resources from an MCP-compatible client. Before connecting an agent, install the PromptLayer skill and MCP servers from MCP & Skills.
  1. Create a Table and sheet in a non-production workspace.
  2. Import a small sample of rows.
  3. Add one computed column at a time and map sources explicitly.
  4. Run stale or selected cells before queueing sheet-wide recalculation.
  5. Confirm scores and outputs, then save a sheet version.
  6. Move automation to production only after outputs match expectations.
For design guidance, see Table Design Patterns.

API references

Create a Table

Create a Table programmatically.

Create a column

Add text or computed columns to a sheet.

Create operation

Queue recalculation work for rows, columns, cells, or stale work.

Get operation

Poll operation status after queueing work.