For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • SDKs
    • Errors
  • Humanloop API
      • STREAMCreate
      • STREAMCompletion Deployed
      • STREAMCompletion Model Config
      • STREAMCreate Experiment Stream
LogoLogo
Sign inBook a demo
Humanloop APICompletions

Create Experiment

POST
https://api.humanloop.com/v4/completion-experiment
POST
/v4/completion-experiment
$curl -X POST https://api.humanloop.com/v4/completion-experiment
200Successful
1{
2 "data": [
3 {
4 "id": "id",
5 "index": 1,
6 "output": "output",
7 "raw_output": "raw_output",
8 "inputs": {
9 "key": "value"
10 },
11 "model_config_id": "model_config_id",
12 "finish_reason": "finish_reason",
13 "tool_results": [
14 {
15 "id": "id",
16 "name": "name",
17 "signature": "signature",
18 "result": "result"
19 }
20 ]
21 }
22 ],
23 "provider_responses": [
24 {
25 "key": "value"
26 }
27 ],
28 "project_id": "project_id",
29 "num_samples": 1,
30 "logprobs": 1,
31 "suffix": "suffix",
32 "user": "user",
33 "usage": {
34 "prompt_tokens": 1,
35 "generation_tokens": 1,
36 "total_tokens": 1,
37 "reasoning_tokens": 1
38 },
39 "metadata": {
40 "key": "value"
41 },
42 "provider_request": {
43 "key": "value"
44 },
45 "session_id": "session_id"
46}
Was this page helpful?
Previous

Create Experiment Stream

Next
Built with

Response

datalist of objects
Array containing the generation responses.
provider_responseslist of any
The raw responses returned by the model provider.
project_idstring
Unique identifier of the parent project. Will not be provided if the request was made without providing a project name or id
num_samplesintegerDefaults to 1
How many completions to make for each set of inputs.
logprobsinteger

Include the log probabilities of the top n tokens in the provider_response

suffixstring
The suffix that comes after a completion of inserted text. Useful for completions that act like inserts.
userstring

End-user ID passed through to provider call.

usageobject
Counts of the number of tokens used and related stats.
metadatamap from strings to any
Any additional metadata to record.
provider_requestmap from strings to any
The raw request sent to the model provider.
session_idstring
ID of the session if it belongs to one.