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.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
  • Overview
    • API reference
  • Mesh API
      • POSTCreate Response
LogoLogo
Mesh APIResponses

Create Response

||View as Markdown|
POST
https://api.meshapi.ai/v1/responses
POST
/v1/responses
$curl -X POST https://api.meshapi.ai/v1/responses \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "input": "What is the capital of France?"
>}'
200Successful
1{
2 "id": "resp_01F8Z7X9Y2K3L4M5N6O7P8Q9R0",
3 "model": "gpt-4o-mini",
4 "output": "The capital of France is Paris.",
5 "created_at": "2024-06-15T12:00:00Z",
6 "usage": {
7 "prompt_tokens": 7,
8 "completion_tokens": 8,
9 "total_tokens": 15
10 }
11}

Responses API endpoint — provider resolved dynamically from DB.

Auth: Authorization: Bearer rsk_<ULID> Streaming: set stream=true for SSE chunks Rate limits: RPM and RPD enforced per key via Redis fixed-window counters Spend cap: enforced if key.spend_cap_usd is set Provider: resolved from model_prices.provider (same as chat/completions)

Was this page helpful?
Previous

Generate Image

Next

Create Embeddings

Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
inputstring or list of anyRequired
modelstring or nullOptional
templatestring or nullOptional
variablesmap from strings to strings or nullOptional
session_idstring or nullOptional
streambooleanOptionalDefaults to false
max_output_tokensinteger or nullOptional>=1
temperaturedouble or nullOptional0-2
top_pdouble or nullOptional0-1
seedinteger or nullOptional
reasoningmap from strings to any or nullOptional
toolslist of objects or nullOptional
tool_choicestring or map from strings to any or nullOptional
response_formatmap from strings to any or nullOptional
pluginslist of any or nullOptional
userstring or nullOptional<=256 characters

Response

Successful Response