Skip to main content

Overview

This walkthrough uses web_search to prepare an API key, get a free quote, execute a tool, and retrieve the result. Complete your first execution with a Bash-compatible shell and cURL, without a language-specific SDK.

Prerequisites

Prepare these five things before calling the API:
  • A NoimosAI account that can sign in to Developer Platform
  • A Developer Platform project with API access enabled
  • A developer API key beginning with nmp_ and the required permissions
  • A Bash-compatible shell
  • cURL, jq, and uuidgen
For paid execution, also check the project’s available prepaid USD balance and monthly limits. See Authenticate requests for key permissions. If no accessible project appears in Developer Platform, ask an organization OWNER or ADMIN to create a project or grant you membership. Create API keys within a project you belong to.

Run the API

Follow these seven steps for your first execution.

1. Create an API key in Developer Platform

A project ADMIN or DEVELOPER can create a key in Developer Platform as follows:
  1. Sign in to Developer Platform and select your project.
  2. Open API Keys and choose Create new key.
  3. Set a descriptive name, expiration, and required permissions, then create the key.
  4. Save the secret key in a secure location; it is shown only once.
This walkthrough requires project:read, tools:read, tools:execute, and executions:read. For other use cases, select only the permissions you need.

2. Set the API key and base URL

Set the API key and base URL as environment variables to avoid writing secrets directly into command history or source code.
The key is shown only once when created. Do not save it in Git repositories, shared documents, or client-side JavaScript.

3. Check the key’s project

First, verify that the key connects to the intended Developer Platform project.
A successful response contains the organization ID, project ID, and project name in data. If the project is unexpected, check the key before executing paid work.

4. Check available tools

Retrieve current tool names, descriptions, input schemas, examples, availability, and pricing.
Check the response-level executionEnabled and your tool’s available. Treat this response as the current source of truth instead of assuming fixed tool counts, models, schemas, or prices. To inspect only web_search, filter the saved response.

5. Get a quote before execution

Send the tool name and arguments to receive the price version and maximum reservation. This does not start paid work.
A successful quote returns priceVersion and maximumChargeMicros, both required for execution. Reuse these values as returned; you do not need to calculate them. maximumChargeMicros is an integer in millionths of a USD: 1 USD equals 1,000,000 micros.
The amounts above only illustrate the response format. The next step reads the actual values from your saved response.

6. Execute the quoted request

Use the same tool and arguments as the quote, adding the returned price version and maximum reservation. Include an idempotency key that identifies this logical request.
This example reuses the quote from step 5 and generates a new idempotency key with uuidgen. Accepted requests return HTTP 202 and an execution ID.
The response also contains the price version, output, errors, and timestamps. chargedMicros: 0 while processing does not mean the execution has been settled as free.

7. Poll the same execution ID

Use the execution ID saved in step 6 and poll at intervals of at least five seconds until completion.
queued, running, and waiting mean processing is ongoing. At succeeded, read output and chargedMicros. See Manage execution and billing for other statuses.
If the execution response is unknown, do not resend with a new idempotency key. Reusing the same body and key retrieves the same accepted execution.
After this walkthrough, read the pages relevant to your implementation: