Poomi
Getting Started

First API Call

Make your first API call to the Poomi platform

This guide demonstrates how to make your first API call. You can use any HTTP client or language.

Request Format

All Poomi API requests follow this pattern:

curl https://www.poomi.pet/api/v1/{endpoint-slug} \
  -H "Authorization: Bearer pk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Example

This example sends an image to an endpoint. Replace {endpoint-slug} with an actual endpoint from the Endpoints page.

curl https://www.poomi.pet/api/v1/{endpoint-slug} \
  -H "Authorization: Bearer pk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "base64_encoded_image_data"
  }'

Python Example

import requests
import base64

# Read and encode the image
with open("pet_photo.jpg", "rb") as f:
    image_data = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://www.poomi.pet/api/v1/{endpoint-slug}",
    headers={
        "Authorization": "Bearer pk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={"image": image_data},
)

result = response.json()
print(result)

Success Response

{
  "success": true,
  "request_id": "req_abc123def456",
  "data": {
    ...
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "INVALID_KEY",
    "message": "Invalid API key"
  }
}

Request Fields

FieldTypeDescription
imagestringBase64-encoded image data. Supported formats: JPG, PNG, WEBP. Max file size: 4MB.
textstringText input (for text endpoints)

The exact fields depend on the endpoint's input type (image, text, or image_text). See Endpoints for details on each endpoint.

Image Guidelines

  • Supported formats: JPG, PNG, WEBP
  • Max file size: 4MB
  • Recommended resolution: at least 640x480 for best results
  • Ensure good lighting and avoid blurry images
  • Center the subject (pet) in the frame

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
request_idstringUnique request ID (req_ prefix)
dataobjectAI model output (schema varies by endpoint)

On this page