MorphogenDocs

Headers

Request and response headers of the Morphogen API.

Request

HeaderWhereValue
Authorizationall endpointsBearer <key>
x-api-keyall endpointsthe key without a prefix. The Anthropic SDK sends it. One of the two headers is enough
anthropic-version/v1/messages2023-06-01. The Anthropic SDK adds it itself
Content-Typerequests with a bodyapplication/json; for speech multipart/form-data, for video multipart is also allowed
X-PII-Masking/v1/chat/completions, /v1/messages, /v1/responseson or off (also true, false, 1, 0). Turns PII masking in the request on or off
X-Morphogen-Spaceall endpoints that spend moneyspc_…. Assigns the spending to a space

If X-PII-Masking is not sent, the organization setting applies, and without the option enabled there is no masking. More: PII masking.

Response

HeaderWhereValue
X-Request-Idall responsesthe request identifier. The service issues it, and a value from the request is not accepted. For POST /v1/videos it is the job identifier video_…
X-PII-Maskingendpoints with maskingapplied if masking was applied, off otherwise. Also present in responses with a provider error
Retry-After429, some 5xxthe pause before a retry, in seconds
Content-Typeall responsesapplication/json; for a stream text/event-stream; for a video file video/mp4

Example

curl -s https://api.morphogen.ru/v1/chat/completions \
  -H "Authorization: Bearer $MORPHOGEN_API_KEY" \
  -H "X-PII-Masking: on" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-6-luna", "max_tokens": 50, "messages": [{"role": "user", "content": "Меня зовут Иван Иванов"}]}' \
  -D - -o /dev/null | grep -i -E "x-pii-masking|x-request-id"
X-Pii-Masking: applied
X-Request-Id: gen-1760104212-Kd3vQ8mZ

On this page