API REFERENCE

Responses

Use stateless text and supported multimodal input with the Responses API.

POST /v1/responses

Check the model page for Responses support. Send input as a text string or an array of messages and supported function-call items. Compatible models also accept inline images and PDFs in user messages. Use store=false and include conversation history yourself.

curl https://api.tokely.me/v1/responses \
  -H "Authorization: Bearer $TOKELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4-mini",
    "input": "Explain an API in one sentence.",
    "max_output_tokens": 1024,
    "store": false
  }'

Core parameters

Choose a model that supports the requested options.

ParameterDescription
modelRequired. Enabled model with Responses support.
inputRequired. Text or 1–128 text/history items.
instructionsOptional text instructions.
max_output_tokensOutput budget including reasoning. Default: 256.
storeMust be false. Stored conversations are unsupported.
streamSet true for Responses SSE events.
toolsUp to 32 function tools. No provider-hosted tools.

Read output and continue

The JSON response contains output items. Extract text from message content items with type output_text. Function calls appear as separate output items.

For the next turn, send prior input and relevant output items in input. previous_response_id and conversation storage are not supported.

EXPLORE DOCUMENTATION

IntroductionConnect your app to AI models through one familiar API. This is your guide to building with Tokely.QuickstartMake your first Tokely request in three steps.API keysConnect securely with a key from your Tokely dashboard.ModelsChoose an available model and use its exact ID in your request.PlaygroundUse the Tokely Playground to test prompts before writing code.Use your existing appConnect an existing OpenAI-compatible application to Tokely.Chat CompletionsGenerate responses from text messages and supported inline images or PDFs.ResponsesUse stateless text and supported multimodal input with the Responses API.EmbeddingsTurn text into vectors for search, RAG, clustering and classification with the OpenAI-compatible /v1/embeddings endpoint.Claude Code and the Messages APIPoint Claude Code or the Anthropic SDK at Tokely. Use the native /v1/messages endpoint with streaming, tools and prompt caching.Images and PDFsSend inline images and PDFs to compatible models through Chat Completions or Responses.Images, video & audioGenerate media with your Tokely API key and account balance.Errors & limitsDiagnose failed requests and keep your integration within service limits.StreamingDisplay generated text as it arrives with server-sent events.Function callingLet a model request a function, then execute it in your application.Structured outputRequest JSON output or a defined schema from a compatible model.Usage & billingModel prices, account balance and output reservations.WebhooksTokely webhook events, HMAC signature verification, delivery retries and replay behavior.
Use Tab to browse results ESC to close