Your first REST run
This walkthrough uses the hosted API at https://api.noticedbysenp.ai. Confirm connection details in Connection and use an account key with read and write scopes. Set OPENSENPAI_API_KEY in your local environment without committing its value.
1. Discover available models
Section titled “1. Discover available models”curl --fail-with-body \ 'https://api.noticedbysenp.ai/api/v1/research/targets'Inspect model_providers, then query an available provider using provider, optional model_query, and limit. For example, if openrouter is listed:
curl --fail-with-body \ 'https://api.noticedbysenp.ai/api/v1/research/targets?provider=openrouter&limit=10'2. Save a request
Section titled “2. Save a request”Create run.json. Replace the provider and model placeholders with discovery results. This first run disables search so you can verify the lifecycle before selecting a supported retrieval mode.
{ "project": "studio-tools-review", "prompts": [ { "id": "studio-planning", "text": "Which project planning tools suit a small design studio? Explain the tradeoffs." } ], "targets": [ { "id": "baseline", "provider": "PROVIDER_FROM_DISCOVERY", "model": "MODEL_ID_FROM_DISCOVERY", "search": { "mode": "off" }, "max_output_tokens": 512 } ], "repetitions": 1, "locale": "en-US", "idempotency_key": "studio-review-example-001", "max_estimated_cost_usd": 0.5}The example’s $0.50 value is a caller-selected limit on the internal admission reservation, not a product price or guaranteed final charge. Choose a unique key for your actual experiment and retain the exact file.
3. Submit
Section titled “3. Submit”Check your observation count and available balance, then submit the bounded request:
curl --fail-with-body \ -H "Authorization: Bearer $OPENSENPAI_API_KEY" \ -H 'Content-Type: application/json' \ --data-binary @run.json \ 'https://api.noticedbysenp.ai/api/v1/research/runs'A new run returns 201 and {run, created}. Retrying identical input with the same key returns the existing run; changing input under that key produces a conflict.
4. Poll and retrieve
Section titled “4. Poll and retrieve”Set RUN_ID to the returned run.id. Treat it as one URL-encoded path segment when constructing requests programmatically.
curl --fail-with-body \ -H "Authorization: Bearer $OPENSENPAI_API_KEY" \ "https://api.noticedbysenp.ai/api/v1/research/runs/$RUN_ID?wait_ms=10000"
curl --fail-with-body \ -H "Authorization: Bearer $OPENSENPAI_API_KEY" \ "https://api.noticedbysenp.ai/api/v1/research/runs/$RUN_ID/observations?limit=25"Poll while the run is queued or running. Follow every returned observation next_cursor until null. Review each observation’s status and error; a terminal run can contain incomplete work. Search was off here, so do not describe its answer as verified web research. Continue with models and search modes and the REST reference.