provod.ai / docs
Start here

Start with provod.ai

Choose a task or send your first non-streaming Chat Completions request.

Last updated on

Choose the result you need. If you are connecting the API for the first time, the quickstart below ends with a real model response.

Choose a task

Send your first API request

You need curl and jq. The request uses Chat Completions without streaming and sets max_tokens to 64, which keeps the first request's output reservation small and explicit.

Create and copy a key once

Open API keys, create a key, and copy the plaintext value immediately. It is not shown again. Keep it in a trusted server environment and never send the complete key to support.

Terminal
set -euo pipefail

export PROVOD_API_KEY="sk_..."

Discover an available chat model

Request text models that advertise max_tokens. The command also checks availability and excludes image endpoint entries before printing the exact ID.

Terminal
if ! MODELS_JSON="$(
  curl --fail-with-body --silent --show-error "https://api.provod.ai/v1/models?output_modalities=text&supported_parameters=max_tokens" \
    -H "Authorization: Bearer $PROVOD_API_KEY"
)"; then
  printf '%s\n' "$MODELS_JSON" >&2
  exit 1
fi

if ! MODEL_ID="$(
  jq -er '
    first(
      .data[]
      | select(
          .available == true
          and ((.architecture.output_modalities // []) | index("text"))
          and ((.supported_parameters // []) | index("max_tokens"))
          and ((.supported_endpoint_types // []) | all(. != "image-generation" and . != "image-edit"))
        )
      | .id
    )
  ' <<<"$MODELS_JSON"
)"; then
  printf 'No available chat model with max_tokens found in /v1/models.\n' >&2
  exit 1
fi
export MODEL_ID
printf '%s\n' "$MODEL_ID"

Send a non-streaming request

Terminal
curl --fail-with-body --silent --show-error https://api.provod.ai/v1/chat/completions \
  -H "Authorization: Bearer $PROVOD_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"model\":\"$MODEL_ID\",\"messages\":[{\"role\":\"user\",\"content\":\"Reply with ok\"}],\"max_tokens\":64,\"stream\":false}"

In a successful response, the assistant text is at choices[0].message.content. On an HTTP error, curl leaves the structured response body visible for diagnosis. Keep the exact returned model ID in your client instead of guessing or copying an old model list.

A platform key discovers an available model and receives a Chat Completions response.

Discover a current model before sending the first request.

Continue from the working request

On this page