The Agent.Space Developer API connects a supported local Agent or your own server integration to models available through your Agent.Space account. Start with a dedicated key, choose a compatible model and client configuration, then verify one small request in Request history before expanding usage. You do not need to write an SDK integration just to connect an existing Codex, Claude Code, or OpenCode client. If the goal is to consolidate several provider keys behind one endpoint, use the one API key, multiple AI models migration guide before changing production traffic.
Do not copy a model name from an old article or put a real key in browser code. The live /v1/models response is the source of truth for model IDs and the endpoints each model can be called on, while the Developer API page is the current product entry point.
Last verified: October 10, 2026. This update checks Agent.Space's public API page and current client-template, model-discovery, and Request history implementation. It does not include an authenticated production call or a measured customer result. Models, protocols and funding rules can change; check the live setup panel before using a configuration.
What the Developer API does
The API is a model-access layer for server integrations. Its current integration shapes include:
- OpenAI Responses and OpenAI Chat Completions through an OpenAI-compatible server SDK configuration.
- Anthropic Messages through an Anthropic-compatible server SDK configuration.
Every text model returned by discovery can be called through all three: Agent.Space serves a model's native protocol directly and translates requests sent through the others. These are still connection shapes, not a promise that every provider feature behaves identically; check that the model supports the capabilities your client requires.
Keep plan allowance and credits distinct. Agent.Space's current API overview describes plan-covered models using allowance and other available models using credits. Check the selected model's current funding and continuation rules in the product: neither a displayed model name nor a successful connection proves that a request will stay within a plan allowance. Agent.Space credits are not an OpenAI or Anthropic API balance.
Choose a local Agent setup or a server SDK
For a local client, use its own tab in the live setup guide. The Codex, Claude Code and OpenCode configurations are not interchangeable. Back up the existing configuration and preserve unrelated settings when applying the generated values. Never commit a configuration containing the full key.
An API connection supplies model access; it does not upload your repository or create a shared project by itself. The rest of this article covers the server integration path and the request checks useful for either route.
Before you integrate
Prepare four things:
- An Agent.Space account eligible for external API access, with the required plan allowance or credits. Check the live panel rather than assuming a signup bonus is sufficient.
- An API key dedicated to this integration or environment.
- The production endpoint:
https://api.agent.space. - A model ID returned by the live model-discovery endpoint.
Use separate keys for local development, production, and automation when independent rotation would reduce downtime. A key name is an organizational label; the secret value is what authorizes spending.
Step 1: Create and protect an API key
Open the Developer API panel and create a key with a name that explains its purpose, such as Production backend. Copy the full value into the intended secret store.
Apply normal credential controls:
- keep the key in a server-side environment variable or approved secret manager;
- never commit it to a repository or paste it into a screenshot, issue, browser bundle, or prompt;
- give each environment its own key when separate revocation matters;
- rotate or revoke a key immediately if exposure is possible.
A local shell can use a placeholder like this:
This is a placeholder, not a recommendation to paste a live key into saved shell history. Load real credentials through your secret manager or another protected local mechanism, and keep them out of diagnostic output.
Step 2: Discover available models
Ask the API which models the current key can access:
Choose the exact returned id. Its endpoints list shows where the model can be called: text models list /v1/chat/completions, /v1/responses, and /v1/messages. The protocols field names the model's native protocol; requests through the other endpoints are translated.
Repeat discovery when you intentionally change models or a previously valid ID disappears. A static model list in a Blog post will age; the live response will not.
Step 3: Connect through the client-native protocol
Use the base URL expected by the client rather than treating the two SDK configurations as interchangeable.
OpenAI Responses example
Install openai in your server project and set both environment variables before running this example. It sends a minimal text prompt, not repository files.
Anthropic Messages example
Install @anthropic-ai/sdk. The model from the previous example works here too: any text model can be called through Messages, and Agent.Space translates the request when the model's native protocol is different.
These examples document the configuration shape. They are not a benchmark, a customer result, or proof of feature parity across models.
Step 4: Verify one small request before real traffic
After the first request, inspect Request history and confirm:
- the expected key was used;
- the model ID and protocol match the configuration;
- the request reached Agent.Space and completed as expected;
- the recorded funding source is the one you intended.
Use this acceptance checklist to avoid mistaking one successful connection for a finished integration:
Filter Request history by the key and narrow it by model or protocol. Keep the request ID, timestamp and any error code when asking for help, but not the key. A row marked pending or requiring reconciliation is not a confirmed final charge. A successful row covered by the plan still consumes allowance; it is not evidence of unlimited free API use.
For a cost review, include every call in the accepted task—not only this first request. The coding Agent API cost calculation guide shows how to separate uncached input, cache activity, output, tools, and retries without inventing a universal task price.
This guide did not send a production request with a reader's key. Its examples mirror the current setup shown by Agent.Space; your own small request and Request history are the evidence that the selected key, model, protocol, and funding path work for your account.
For an application upgrade, the Opus 5.5 API migration test plan covers response blocks, tool loops, and safe retries.
Rotate, revoke, and troubleshoot in a fixed order
Rotation invalidates the old secret, so update the dependent service as part of the cutover. Revocation is appropriate when an integration is retired or a key may be exposed. Renaming helps organization but does not change the secret.
When a request fails, check one layer at a time:
- Is the complete active key available to this server process?
- Does
/v1/modelsreturn the configured model ID? - Does that model's
endpointslist include the path the client calls? - Is the base URL correct for the SDK shape?
- Is the relevant funding path available for the selected model?
- Does Request history show that the request reached Agent.Space?
This order separates authentication, model availability, endpoint compatibility, routing, and funding. Changing all five at once makes the failure harder to diagnose.
Use the HTTP response and Request history together rather than guessing from one symptom:
An HTTP status is a clue, not a complete diagnosis. Preserve the response body and request identifier when one is returned, and never paste the API key itself into logs, screenshots, or support messages.
When the connection works but traffic fails, distinguish API rate limits and bounded retries from latency in the model, client, or tools. Keep credential changes separate: the API-key security checklist covers rotation and exposure response.
Start with a small verified integration
The safe first integration is deliberately narrow: one named key, one model selected from live discovery, one client-native protocol, and one small verification request. Expand only after Request history matches the configuration you intended.
Review current Agent.Space plans and model pricing, then create your Agent.Space account. Once the account has the funding path you want, return to the Developer API page to create the integration key.
