Create a span
Create a span representing a single LLM interaction. Spans are the core data unit in Respan — every LLM call, agent step, or tool invocation is stored as a span.
Span size limit: 20MB per payload.
Headers
Bearer token. Use Bearer YOUR_API_KEY.
Request
Deprecated. Use input instead.
Deprecated. Use output instead.
The input to the model. Format depends on log_type.
The output from the model. Format depends on log_type.
Type of span. Determines how input and output are parsed.
Cost in USD. Auto-calculated from model pricing if omitted.
Arbitrary key-value pairs for your reference.
Conversation thread ID for multi-turn conversations.
Tools available to the model (OpenAI function calling format).
Controls tool selection. "none", "auto", or a specific tool object.
Response format configuration (e.g. JSON mode or structured output).
Sampling temperature (0-2). Higher = more random.
Penalizes repeated tokens (-2 to 2).
Penalizes tokens already present (-2 to 2).
Set true when using a custom prompt_id.
Custom price per 1M prompt tokens (for self-hosted/fine-tuned models).
Custom price per 1M completion tokens (for self-hosted/fine-tuned models).
User feedback. true = positive, false = negative.